X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fblockquote%2Fplugin.js;h=84dee8156b044fc71fe6ef4e072adbe142d2bbb8;hb=3fe9cac293e090ea459a3ee10d78cbe9e1dd0e03;hp=4015bee175ccf9c337339afa6317926a2bcb0417;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/blockquote/plugin.js b/_source/plugins/blockquote/plugin.js index 4015bee..84dee81 100644 --- a/_source/plugins/blockquote/plugin.js +++ b/_source/plugins/blockquote/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, 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 ) {