Ticket #131: wymeditor-paste-fix.patch
| File wymeditor-paste-fix.patch, 0.8 kB (added by c_t, 22 months ago) |
|---|
-
js/wymeditor/jquery.wymeditor.js
1201 1201 sTmp = sTmp.replace(rExp, "<br />"); 1202 1202 jQuery(container).after("<p>" + sTmp + "</p>"); 1203 1203 } 1204 // remove empty container where stuff was pasted in. 1205 if (jQuery(container).html() == "<" + WYMeditor.BR + ">") { 1206 jQuery(container).remove(); 1207 } 1204 1208 } else { 1209 //empty area, if someone just clicked in it 1210 if (jQuery(this._doc.body).html() == "<" + WYMeditor.BR + ">") { 1211 jQuery(this._doc.body).html(''); 1212 } 1205 1213 for(x = 0; x < aP.length; x++) { 1206 1214 sTmp = aP[x]; 1207 1215 //simple newlines are replaced by a break