X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fremoveformat%2Fplugin.js;h=86544ab87a8b76f6bec1aa13c31d5476a599dce3;hp=28b4ea76a0d6ca9482c74298096d29e38f2a57e9;hb=039a051ccf3901311661022a30afd60fc38130c9;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7 diff --git a/_source/plugins/removeformat/plugin.js b/_source/plugins/removeformat/plugin.js index 28b4ea7..86544ab 100644 --- a/_source/plugins/removeformat/plugin.js +++ b/_source/plugins/removeformat/plugin.js @@ -35,7 +35,7 @@ CKEDITOR.plugins.removeformat = ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) ); var filter = CKEDITOR.plugins.removeformat.filter; - var ranges = editor.getSelection().getRanges( true ), + var ranges = editor.getSelection().getRanges( 1 ), iterator = ranges.createIterator(), range; @@ -50,8 +50,8 @@ CKEDITOR.plugins.removeformat = var bookmark = range.createBookmark(); // The style will be applied within the bookmark boundaries. - var startNode = bookmark.startNode; - var endNode = bookmark.endNode; + var startNode = bookmark.startNode, + endNode = bookmark.endNode; // We need to check the selection boundaries (bookmark spans) to break // the code in a way that we can properly remove partially selected nodes. @@ -66,8 +66,8 @@ CKEDITOR.plugins.removeformat = var breakParent = function( node ) { // Let's start checking the start boundary. - var path = new CKEDITOR.dom.elementPath( node ); - var pathElements = path.elements; + var path = new CKEDITOR.dom.elementPath( node ), + pathElements = path.elements; for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ ) { @@ -103,7 +103,7 @@ CKEDITOR.plugins.removeformat = { // Remove elements nodes that match with this style rules. if ( tagsRegex.test( currentNode.getName() ) ) - currentNode.remove( true ); + currentNode.remove( 1 ); else { currentNode.removeAttributes( removeAttributes );