X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fblockquote%2Fplugin.js;h=f17aec268e26ea7b093e5a3f908fa751fd80f8c6;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=a25c1a1888e6fd415910aaf9cb7f45a79f97d2fd;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/blockquote/plugin.js b/_source/plugins/blockquote/plugin.js index a25c1a1..f17aec2 100644 --- a/_source/plugins/blockquote/plugin.js +++ b/_source/plugins/blockquote/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -25,8 +25,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function onSelectionChange( evt ) { - var editor = evt.editor, - command = editor.getCommand( 'blockquote' ); + var editor = evt.editor; + if ( editor.readOnly ) + return; + + var command = editor.getCommand( 'blockquote' ); command.state = getState( editor, evt.data.path ); command.fire( 'state' ); } @@ -47,7 +50,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { var state = editor.getCommand( 'blockquote' ).state, selection = editor.getSelection(), - range = selection && selection.getRanges()[0]; + range = selection && selection.getRanges( true )[0]; if ( !range ) return; @@ -95,6 +98,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var iterator = range.createIterator(), block; + iterator.enlargeBr = editor.config.enterMode != CKEDITOR.ENTER_BR; if ( state == CKEDITOR.TRISTATE_OFF ) {