{\r
var $clone = this.$.cloneNode( includeChildren );\r
\r
- if ( !cloneId )\r
+ var removeIds = function( node )\r
{\r
- var removeIds = function( node )\r
- {\r
- if ( node.nodeType != CKEDITOR.NODE_ELEMENT )\r
- return;\r
+ if ( node.nodeType != CKEDITOR.NODE_ELEMENT )\r
+ return;\r
\r
- node.removeAttribute( 'id', false ) ;\r
- node.removeAttribute( '_cke_expando', false ) ;\r
+ if ( !cloneId )\r
+ node.removeAttribute( 'id', false );\r
+ node.removeAttribute( 'data-cke-expando', false );\r
\r
+ if ( includeChildren )\r
+ {\r
var childs = node.childNodes;\r
- for ( var i=0 ; i < childs.length ; i++ )\r
+ for ( var i=0; i < childs.length; i++ )\r
removeIds( childs[ i ] );\r
- };\r
+ }\r
+ };\r
\r
- // The "id" attribute should never be cloned to avoid duplication.\r
- removeIds( $clone );\r
- }\r
+ // The "id" attribute should never be cloned to avoid duplication.\r
+ removeIds( $clone );\r
\r
return new CKEDITOR.dom.node( $clone );\r
},\r
*/\r
getDocument : function()\r
{\r
- var document = new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument );\r
-\r
- return (\r
- this.getDocument = function()\r
- {\r
- return document;\r
- })();\r
+ return new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument );\r
},\r
\r
getIndex : function()\r