Ticket #3764: 3764.patch

File 3764.patch, 865 bytes (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/showblocks/plugin.js

     
    9999                refresh : function( editor )
    100100                {
    101101                        var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass';
    102                         editor.document.getBody()[funcName]( 'cke_show_blocks' );
     102                        editor.document.getBody()[ funcName ]( 'cke_show_blocks' );
    103103                }
    104104        };
    105105
     
    131131                                        if ( command.state != CKEDITOR.TRISTATE_DISABLED )
    132132                                                command.refresh( editor );
    133133                                });
     134                       
     135                        // Refresh the command on setData.
     136                        editor.on( 'contentDom', function() {
     137                                if ( command.state != CKEDITOR.TRISTATE_DISABLED )
     138                                                command.refresh( editor );
     139                        });
    134140                }
    135141        });
    136142} )();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy