Dummy(Duplicate) Node in Ckeditor [IE]

偶尔善良 提交于 2019-12-22 01:17:05

问题


in CKEDITOR Document I have a node named User_Image

<User_Image><sometags><sometags>sometext<sometags>sometext</sometags></sometags></sometags></User_Image>

User_Image node i stored in Variable Uimage

var Duimage=CKEDITOR.dom.element.createFromHtml(Uimage.getOuterHtml());

now just i created (dummy) duplicate node but this code supported me in all browsers other than IE. in IE Missing Customtags. the all tags are dynamic.

then i try with following :

var Duimage=ediInstance.document.createElement("User_Image");
 Uimage.appendTo(Duimage);

but in this code if i changed in Duimage it also affect in CKEDITOR Document

any other Idea to get Duplicate Node ?


回答1:


First of all - check my answer here IE lose custom tag while sethtml

Second - after you add support for custom tag in IE (remember to do this in the document in which element will be used) you can use element's clone() method. Here's its doc: http://nightly-v4.ckeditor.com/ckeditor_api/#!/api/CKEDITOR.dom.node-method-clone



来源:https://stackoverflow.com/questions/13023608/dummyduplicate-node-in-ckeditor-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!