Ckeditor中的Dummy(重复)节点[IE] [英] Dummy(Duplicate) Node in Ckeditor [IE]

查看:163
本文介绍了Ckeditor中的Dummy(重复)节点[IE]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

in CKEDITOR Document我有一个名为 User_Image 的节点

in CKEDITOR Document I have a node named User_Image

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

User_Image节点i存储在变量Uimage中

User_Image node i stored in Variable Uimage

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

现在只是我创建了(dummy)重复节点,但是这个代码在IE以外的所有浏览器中都支持我。
在IE缺少Customtags。所有标签都是动态的。

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.

然后我尝试以下操作:

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

但在这段代码中如果我在Duimage中改变它也影响CKEDITOR文档

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

任何其他的想要获得重复节点?

any other Idea to get Duplicate Node ?

推荐答案

首先 - IE浏览器丢失ckeditor元素setHtml(< userdefinedTags>< ; / userdefinedTags>")

第二步 - 在IE中添加对自定义标记的支持(记住在文档中这样做,使用),你可以使用元素的 clone()方法。以下是其文档: http:// nightly- v4.ckeditor.com/ckeditor_api/#!/api/CKEDITOR.dom.node-method-clone

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

这篇关于Ckeditor中的Dummy(重复)节点[IE]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆