Ticket #6419: 6419_4.patch
File 6419_4.patch, 2.0 KB (added by , 13 years ago) |
---|
-
_source/core/dom/node.js
107 107 { 108 108 var $clone = this.$.cloneNode( includeChildren ); 109 109 110 if ( !cloneId ) 111 { 112 var removeIds = function( node ) 113 { 114 if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) 115 return; 110 var removeIds = function( node ) 111 { 112 if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) 113 return; 116 114 117 node.removeAttribute( 'id', false ) ; 118 node.removeAttribute( '_cke_expando', false ) ; 115 if ( !cloneId ) 116 node.removeAttribute( 'id', false ); 117 node.removeAttribute( '_cke_expando', false ); 119 118 119 if ( includeChildren ) 120 { 120 121 var childs = node.childNodes; 121 for ( var i=0 ; i < childs.length; i++ )122 for ( var i=0; i < childs.length; i++ ) 122 123 removeIds( childs[ i ] ); 123 }; 124 } 125 }; 124 126 125 // The "id" attribute should never be cloned to avoid duplication. 126 removeIds( $clone ); 127 } 127 // The "id" attribute should never be cloned to avoid duplication. 128 removeIds( $clone ); 128 129 129 130 return new CKEDITOR.dom.node( $clone ); 130 131 }, -
_source/core/dom/domobject.js
167 167 /** 168 168 * Sets a data slot value for this object. These values are shared by all 169 169 * instances pointing to that same DOM object. 170 * <strong>Note:</strong> The created data slot is only guarantied to be available on this unique dom node, 171 * thus any wish to continue access it from other element clones (either created by clone node or from innerHtml) 172 * will fail, for such usage, please use {@link CKEDITOR.dom.element::setAttribute} instead. 170 173 * @name CKEDITOR.dom.domObject.prototype.setCustomData 171 174 * @function 172 175 * @param {String} key A key used to identify the data slot.