X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=6107cdfe85b48e5a7768ea07336805ea1564b6ad;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=cbec3141b36f5ed607d72b4ae1d62a4f7e822829;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index cbec314..6107cdf 100644 --- a/_source/plugins/showblocks/plugin.js +++ b/_source/plugins/showblocks/plugin.js @@ -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' ); + } } };