JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / list / plugin.js
index be74702..4c728fa 100644 (file)
@@ -218,7 +218,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );\r
                }\r
 \r
-               var fakeParent = groupObj.root.getDocument().createElement( this.type );\r
+               var root = groupObj.root,\r
+                       fakeParent = root.getDocument().createElement( this.type );\r
+               // Copy all attributes, except from 'start' and 'type'.\r
+               root.copyAttributes( fakeParent, { start : 1, type : 1 } );\r
+               // The list-style-type property should be ignored.\r
+               fakeParent.removeStyle( 'list-style-type' );\r
+\r
                for ( i = 0 ; i < selectedListItems.length ; i++ )\r
                {\r
                        var listIndex = selectedListItems[i].getCustomData( 'listarray_index' );\r
@@ -438,17 +444,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        while ( ranges.length > 0 )\r
                        {\r
                                range = ranges.shift();\r
-\r
-                               var boundaryNodes = range.getBoundaryNodes(),\r
-                                       startNode = boundaryNodes.startNode,\r
-                                       endNode = boundaryNodes.endNode;\r
-\r
-                               if ( startNode.type == CKEDITOR.NODE_ELEMENT && startNode.getName() == 'td' )\r
-                                       range.setStartAt( boundaryNodes.startNode, CKEDITOR.POSITION_AFTER_START );\r
-\r
-                               if ( endNode.type == CKEDITOR.NODE_ELEMENT && endNode.getName() == 'td' )\r
-                                       range.setEndAt( boundaryNodes.endNode, CKEDITOR.POSITION_BEFORE_END );\r
-\r
                                var iterator = range.createIterator(),\r
                                        block;\r
 \r