X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=de951246045b5c553b8aaf86b571427069c6ead6;hb=refs%2Ftags%2Fv3.6.3;hp=4eb887872231075a6aa3d814e1d4df7a364ec406;hpb=9afde8772159bd3436f1f5b7862960307710ae5a;p=ckeditor.git diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index 4eb8878..de95124 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-2012, 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' ); + } } };