JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / showborders / plugin.js
index 5987be7..e7e9eec 100644 (file)
@@ -83,6 +83,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        if ( command.state != CKEDITOR.TRISTATE_DISABLED )\r
                                                command.refresh( editor );\r
                                });\r
+\r
+                       editor.on( 'removeFormatCleanup', function( evt )\r
+                               {\r
+                                       var element = evt.data;\r
+                                       if ( editor.getCommand( 'showborders' ).state == CKEDITOR.TRISTATE_ON &&\r
+                                               element.is( 'table' ) && ( !element.hasAttribute( 'border' ) || parseInt( element.getAttribute( 'border' ), 10 ) <= 0 ) )\r
+                                                       element.addClass( showBorderClassName );\r
+                               });\r
                },\r
 \r
                afterInit : function( editor )\r