X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fremoveformat%2Fplugin.js;h=28b4ea76a0d6ca9482c74298096d29e38f2a57e9;hp=d54bfb350ca45e0ad755ec60451baa6c1232e2e7;hb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;hpb=055b6b0792ce7dc53d47af606b367c04b927c2ab diff --git a/_source/plugins/removeformat/plugin.js b/_source/plugins/removeformat/plugin.js index d54bfb3..28b4ea7 100644 --- 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( ',' ) ); var filter = CKEDITOR.plugins.removeformat.filter; - var ranges = editor.getSelection().getRanges(); + var ranges = editor.getSelection().getRanges( true ), + iterator = ranges.createIterator(), + range; - for ( var i = 0, range ; range = ranges[ i ] ; i++ ) + while ( ( range = iterator.getNextRange() ) ) { if ( range.collapsed ) continue;