Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.4b
[ckeditor.git]
/
_source
/
plugins
/
removeformat
/
plugin.js
diff --git
a/_source/plugins/removeformat/plugin.js
b/_source/plugins/removeformat/plugin.js
index
84d7947
..
28b4ea7
100644
(file)
--- a/
_source/plugins/removeformat/plugin.js
+++ b/
_source/plugins/removeformat/plugin.js
@@
-35,9
+35,11
@@
CKEDITOR.plugins.removeformat =
( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
\r
\r
var filter = CKEDITOR.plugins.removeformat.filter;
\r
( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
\r
\r
var filter = CKEDITOR.plugins.removeformat.filter;
\r
- var ranges = editor.getSelection().getRanges();
\r
+ var ranges = editor.getSelection().getRanges( true ),
\r
+ iterator = ranges.createIterator(),
\r
+ range;
\r
\r
\r
- for ( var i = 0, range ; range = ranges[ i ] ; i++ )
\r
+ while ( ( range = iterator.getNextRange() ) )
\r
{
\r
if ( range.collapsed )
\r
continue;
\r
{
\r
if ( range.collapsed )
\r
continue;
\r
@@
-103,7
+105,10
@@
CKEDITOR.plugins.removeformat =
if ( tagsRegex.test( currentNode.getName() ) )
\r
currentNode.remove( true );
\r
else
\r
if ( tagsRegex.test( currentNode.getName() ) )
\r
currentNode.remove( true );
\r
else
\r
+ {
\r
currentNode.removeAttributes( removeAttributes );
\r
currentNode.removeAttributes( removeAttributes );
\r
+ editor.fire( 'removeFormatCleanup', currentNode );
\r
+ }
\r
}
\r
\r
currentNode = nextNode;
\r
}
\r
\r
currentNode = nextNode;
\r
@@
-170,3
+175,10
@@
CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,
* @example
\r
*/
\r
CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
\r
* @example
\r
*/
\r
CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
\r
+
\r
+/**
\r
+ * Fired after an element was cleaned by the removeFormat plugin.
\r
+ * @name CKEDITOR#removeFormatCleanup
\r
+ * @event
\r
+ * @param {Object} data.element The element that was cleaned up.
\r
+ */
\r