0
我有两个CKEditor,由Liferay脚本在我看来一个接一个地创建。两者都是分开的div。我想改变它的顺序。用CKEditors更改两个div的顺序
我尝试使用这样的:
var firstDivWithCKEditor = document.getElementById("firstDivWithCKEditor");
var secondDivWithCKEditor = document.getElementById("secondDivWithCKEditor ");
var parentDiv = secondDivWithCKEditor.parentNode();
parent.insertBefore(secondDivWithCKEditor , firstDivWithCKEditor);
的顺序被改变,但这种手术后,我不能做一个主编和参编在前看不见里面的HTML enything。单击编辑器中的任何按钮后,在控制台上出现错误:Uncaught TypeError:无法读取未定义的属性'getSelection'。
任何人都知道什么是错的?
见http://stackoverflow.com/questions/30494039/ckeditor-loses-content-when-removed-from-dom-and-added-再次/ 30501225#30501225如果您想知道为什么无法在DOM中移动编辑器。 – Reinmar