X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fshowborders%2Fplugin.js;h=e7e9eecfb321a62961ae712febe66fcdc80a6283;hb=refs%2Ftags%2Fv3.3.2;hp=5987be733e1fe136866cf2bf116765baf14b5c0d;hpb=66f4ae0bf0280ed56bf7c0f4ab175424dd1d47a0;p=ckeditor.git diff --git a/_source/plugins/showborders/plugin.js b/_source/plugins/showborders/plugin.js index 5987be7..e7e9eec 100644 --- a/_source/plugins/showborders/plugin.js +++ b/_source/plugins/showborders/plugin.js @@ -83,6 +83,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( command.state != CKEDITOR.TRISTATE_DISABLED ) command.refresh( editor ); }); + + editor.on( 'removeFormatCleanup', function( evt ) + { + var element = evt.data; + if ( editor.getCommand( 'showborders' ).state == CKEDITOR.TRISTATE_ON && + element.is( 'table' ) && ( !element.hasAttribute( 'border' ) || parseInt( element.getAttribute( 'border' ), 10 ) <= 0 ) ) + element.addClass( showBorderClassName ); + }); }, afterInit : function( editor )