Changeset 625
- Timestamp:
- 05/24/09 23:54:19 (3 years ago)
- Location:
- trunk/src/wymeditor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wymeditor/jquery.wymeditor.explorer.js
r624 r625 26 26 this._newLine = "\r\n"; 27 27 28 //r623 fix doesn't work in MSIE29 wym._options.replaceBrInPreWith = false;30 28 }; 31 29 -
trunk/src/wymeditor/jquery.wymeditor.js
r623 r625 347 347 348 348 direction: "ltr", 349 350 replaceBrInPreWith: ' ',351 349 352 350 boxHtml: "<div class='wym_box'>" … … 910 908 */ 911 909 WYMeditor.editor.prototype.xhtml = function() { 912 if(this._options.replaceBrInPreWith)913 jQuery('pre > br', this._doc.body).replaceWith(this._options.replaceBrInPreWith); //Fix PRE bug #81914 910 return this.parser.parse(this.html()); 915 911 }; … … 3422 3418 xhtml = this.joinRepeatedEntities(xhtml); 3423 3419 xhtml = this.removeEmptyTags(xhtml); 3420 xhtml = this.removeBrInPre(xhtml); 3424 3421 return xhtml; 3425 3422 }; … … 3443 3440 { 3444 3441 return xhtml.replace(new RegExp('<('+this.block_tags.join("|").replace(/\|td/,'').replace(/\|th/, '')+')>(<br \/>| | |\\s)*<\/\\1>' ,'g'),''); 3442 }; 3443 3444 WYMeditor.XhtmlSaxListener.prototype.removeBrInPre = function(xhtml) 3445 { 3446 var matches = xhtml.match(new RegExp('<pre[^>]*>(.*?)<\/pre>','gmi')); 3447 for(var i=0; i<matches.length; i++) { 3448 xhtml = xhtml.replace(matches[i], matches[i].replace(new RegExp('<br \/>', 'g'), String.fromCharCode(13,10))); 3449 } 3450 return xhtml; 3445 3451 }; 3446 3452
Note: See TracChangeset
for help on using the changeset viewer.