Ticket #5819: 5819_3.patch

File 5819_3.patch, 1.1 KB (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/removeformat/plugin.js

     
    3434                                var removeAttributes = editor._.removeAttributes ||
    3535                                        ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
    3636
     37                                var showBordersCommand = editor.getCommand( 'showborders' );
     38
    3739                                var filter = CKEDITOR.plugins.removeformat.filter;
    3840                                var ranges = editor.getSelection().getRanges();
    3941
     
    103105                                                        if ( tagsRegex.test( currentNode.getName() ) )
    104106                                                                currentNode.remove( true );
    105107                                                        else
     108                                                        {
    106109                                                                currentNode.removeAttributes( removeAttributes );
     110
     111                                                                if ( currentNode.is( 'table' )
     112                                                                        && showBordersCommand && showBordersCommand.state == CKEDITOR.TRISTATE_ON
     113                                                                        && !currentNode.hasAttribute( 'border' ) )
     114                                                                                currentNode.addClass( 'cke_show_border' );
     115                                                        }
    107116                                                }
    108117
    109118                                                currentNode = nextNode;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy