X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Flistblock%2Fplugin.js;h=63f85c72bafa1696683324a088fb606c3d433f21;hb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;hp=848cc2aa99a1ec537ecd88dd89a07ee378eeacdc;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/listblock/plugin.js b/_source/plugins/listblock/plugin.js index 848cc2a..63f85c7 100644 --- a/_source/plugins/listblock/plugin.js +++ b/_source/plugins/listblock/plugin.js @@ -9,9 +9,9 @@ CKEDITOR.plugins.add( 'listblock', onLoad : function() { - CKEDITOR.ui.panel.prototype.addListBlock = function( name, definiton ) + CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition ) { - return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definiton ) ); + return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definition ) ); }; CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass( @@ -195,11 +195,14 @@ CKEDITOR.plugins.add( 'listblock', this.element.getDocument().getById( itemId + '_option' ).setAttribute( 'aria-selected', true ); this.element.setAttribute( 'aria-activedescendant', itemId + '_option' ); + + this.onMark && this.onMark( item ); }, unmark : function( value ) { this.element.getDocument().getById( this._.items[ value ] ).removeClass( 'cke_selected' ); + this.onUnmark && this.onUnmark( this._.items[ value ] ); }, unmarkAll : function() @@ -211,6 +214,8 @@ CKEDITOR.plugins.add( 'listblock', { doc.getById( items[ value ] ).removeClass( 'cke_selected' ); } + + this.onUnmark && this.onUnmark(); }, isMarked : function( value )