Ticket #5819: 5819_4.patch

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

     
    103103                                                        if ( tagsRegex.test( currentNode.getName() ) )
    104104                                                                currentNode.remove( true );
    105105                                                        else
     106                                                        {
    106107                                                                currentNode.removeAttributes( removeAttributes );
     108                                                                editor.fire( 'removeFormatCleanup', currentNode );
     109                                                        }
    107110                                                }
    108111
    109112                                                currentNode = nextNode;
     
    170173 * @example
    171174 */
    172175CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
     176
     177/**
     178 * Fired after an element was cleaned by the removeFormat plugin.
     179 * @name CKEDITOR#removeFormatCleanup
     180 * @event
     181 * @param {Object} data.element The element that was cleaned up.
     182 */
  • _source/plugins/showborders/plugin.js

     
    8383                                        if ( command.state != CKEDITOR.TRISTATE_DISABLED )
    8484                                                command.refresh( editor );
    8585                                });
     86
     87                        editor.on( 'removeFormatCleanup', function( evt )
     88                                {
     89                                        var element = evt.data;
     90                                        if ( editor.getCommand( 'showborders' ).state == CKEDITOR.TRISTATE_ON &&
     91                                                element.is( 'table' ) && !element.hasAttribute( 'border' ) )
     92                                                        element.addClass( showBorderClassName );
     93                                });
    8694                },
    8795
    8896                afterInit : function( editor )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy