X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fjustify%2Fplugin.js;h=a3ff0ddd192aad332bdff771e0d5d85d7b720fc1;hb=c6e377a02b54abc07129d72b632763c727476a15;hp=39bf8f65e55d1fc8227ef19e3de84a0e43973969;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/justify/plugin.js b/_source/plugins/justify/plugin.js index 39bf8f6..a3ff0dd 100644 --- a/_source/plugins/justify/plugin.js +++ b/_source/plugins/justify/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -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' );