X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fremoveformat%2Fplugin.js;h=d54bfb350ca45e0ad755ec60451baa6c1232e2e7;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=84d7947656389937dd085e22cea6f554cd84c8e8;hpb=66f4ae0bf0280ed56bf7c0f4ab175424dd1d47a0;p=ckeditor.git diff --git a/_source/plugins/removeformat/plugin.js b/_source/plugins/removeformat/plugin.js index 84d7947..d54bfb3 100644 --- a/_source/plugins/removeformat/plugin.js +++ b/_source/plugins/removeformat/plugin.js @@ -103,7 +103,10 @@ CKEDITOR.plugins.removeformat = if ( tagsRegex.test( currentNode.getName() ) ) currentNode.remove( true ); else + { currentNode.removeAttributes( removeAttributes ); + editor.fire( 'removeFormatCleanup', currentNode ); + } } currentNode = nextNode; @@ -170,3 +173,10 @@ CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp, * @example */ CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign'; + +/** + * Fired after an element was cleaned by the removeFormat plugin. + * @name CKEDITOR#removeFormatCleanup + * @event + * @param {Object} data.element The element that was cleaned up. + */