X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=56d4f3bfdb0eeaba0f8d07c4f10f603ccb9b0065;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=818e8330489a94e141a0a1ca37f346bb6c99a2cb;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;p=ckeditor.git diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index 818e833..56d4f3b 100644 --- a/_source/plugins/showblocks/plugin.js +++ b/_source/plugins/showblocks/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, 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 */ @@ -89,6 +89,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var commandDefinition = { + readOnly : 1, preserveState : true, editorFocus : false, @@ -100,8 +101,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license refresh : function( editor ) { - var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; - editor.document.getBody()[ funcName ]( 'cke_show_blocks' ); + if ( editor.document ) + { + var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; + editor.document.getBody()[ funcName ]( 'cke_show_blocks' ); + } } }; @@ -147,10 +151,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Whether to automaticaly enable the "show block" command when the editor - * loads. + * loads. (StartupShowBlocks in FCKeditor) + * @name CKEDITOR.config.startupOutlineBlocks * @type Boolean * @default false * @example * config.startupOutlineBlocks = true; */ -CKEDITOR.config.startupOutlineBlocks = false;