IE lose custom tag while sethtml

巧了我就是萌 提交于 2019-11-29 17:34:58

If you want to use your own tags in IE you've got to create them first. This is the same situation that we've got with HTML5 tags.

So before setting HTML with <myTag>, create it CKEDITOR.document.createElement( 'mytag' ) just to let IE know it exists.

BTW. Remember that elements must be created in the same document in which they'll be used. So if you want to insert them into editor's content, then create them in editor's document (e.g. CKEDITOR.instances.editor1.document). Otherwise IE will throw an error.

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