JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / removeformat / plugin.js
index 28b4ea7..86544ab 100644 (file)
@@ -35,7 +35,7 @@ CKEDITOR.plugins.removeformat =
                                        ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );\r
 \r
                                var filter = CKEDITOR.plugins.removeformat.filter;\r
-                               var ranges = editor.getSelection().getRanges( true ),\r
+                               var ranges = editor.getSelection().getRanges( 1 ),\r
                                        iterator = ranges.createIterator(),\r
                                        range;\r
 \r
@@ -50,8 +50,8 @@ CKEDITOR.plugins.removeformat =
                                        var bookmark = range.createBookmark();\r
 \r
                                        // The style will be applied within the bookmark boundaries.\r
-                                       var startNode   = bookmark.startNode;\r
-                                       var endNode             = bookmark.endNode;\r
+                                       var startNode   = bookmark.startNode,\r
+                                               endNode         = bookmark.endNode;\r
 \r
                                        // We need to check the selection boundaries (bookmark spans) to break\r
                                        // the code in a way that we can properly remove partially selected nodes.\r
@@ -66,8 +66,8 @@ CKEDITOR.plugins.removeformat =
                                        var breakParent = function( node )\r
                                        {\r
                                                // Let's start checking the start boundary.\r
-                                               var path = new CKEDITOR.dom.elementPath( node );\r
-                                               var pathElements = path.elements;\r
+                                               var path = new CKEDITOR.dom.elementPath( node ),\r
+                                                       pathElements = path.elements;\r
 \r
                                                for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ )\r
                                                {\r
@@ -103,7 +103,7 @@ CKEDITOR.plugins.removeformat =
                                                {\r
                                                        // Remove elements nodes that match with this style rules.\r
                                                        if ( tagsRegex.test( currentNode.getName() ) )\r
-                                                               currentNode.remove( true );\r
+                                                               currentNode.remove( 1 );\r
                                                        else\r
                                                        {\r
                                                                currentNode.removeAttributes( removeAttributes );\r