- var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass';\r
- editor.document.getBody()[ funcName ]( 'cke_show_blocks' );\r
+ if ( editor.document )\r
+ {\r
+ var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass';\r
+ editor.document.getBody()[ funcName ]( 'cke_show_blocks' );\r
+ }\r