Ticket #3526: 3526_3.patch
File 3526_3.patch, 1.2 KB (added by , 15 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
371 371 }, 372 372 0 ); 373 373 }; 374 374 var emptyParagraphRegexp = /\s*<(p|div|address|h\d|center)[^>]*>\s*(?:<br[^>]*>| | )\s*(:?<\/\1>)?\s*$/gi; 375 375 editor.addMode( 'wysiwyg', 376 376 { 377 377 load : function( holderElement, data, isSnapshot ) … … 456 456 if ( editor.dataProcessor ) 457 457 data = editor.dataProcessor.toDataFormat( data, ( editor.config.enterMode != CKEDITOR.ENTER_BR ) ); 458 458 459 // Strip the last blank paragraph within document. 460 if ( editor.config.ignoreEmptyParagraph ) 461 data = data.replace( emptyParagraphRegexp, '' ); 462 459 463 return data; 460 464 }, 461 465 … … 533 537 * config.disableNativeSpellChecker = false; 534 538 */ 535 539 CKEDITOR.config.disableNativeSpellChecker = true; 540 /** 541 * The editor will post an empty value ("") if you have just an empty paragraph on it, like this: 542 * @example 543 * <p></p> 544 * <p><br /></p> 545 * <p><b></b></p> 546 */ 547 CKEDITOR.config.ignoreEmptyParagraph = true;