X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fjustify%2Fplugin.js;h=a3ff0ddd192aad332bdff771e0d5d85d7b720fc1;hp=95bc5b21db0a02c433e192f39e8e742862409fd0;hb=c6e377a02b54abc07129d72b632763c727476a15;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6 diff --git a/_source/plugins/justify/plugin.js b/_source/plugins/justify/plugin.js index 95bc5b2..a3ff0dd 100644 --- a/_source/plugins/justify/plugin.js +++ b/_source/plugins/justify/plugin.js @@ -66,7 +66,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license justifyCommand.prototype = { exec : function( editor ) { - var selection = editor.getSelection(); + var selection = editor.getSelection(), + enterMode = editor.config.enterMode; + if ( !selection ) return; @@ -80,6 +82,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license for ( var i = ranges.length - 1 ; i >= 0 ; i-- ) { iterator = ranges[ i ].createIterator(); + iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR; + while ( ( block = iterator.getNextParagraph() ) ) { block.removeAttribute( 'align' );