网上找的 方法 如下 适合 4.X以后的版本
两种方法:
1)用KindEditor.instances数组获取。KindEditor.instances[0].html(); KindEditor.instances[1].html();
2)K.create返回的editor对象起不同的名,window.editor1 = K.create(..); window.editor2 = K.create(..)。然后editor1.html(); editor2.html();
给提交button加上onclick方法,在方法里将editor1和editor2的值直接赋予对应的textarea,然后提交表单即可。
如:
function XX{
$("#textarea1").html(editor1.html());
$("#textarea2").html(editor2.html());
document.forms[0].submit();
}
本文介绍了如何在网页中使用KindEditor插件获取编辑器内容,并通过JavaScript将其赋值到对应的文本区域后提交表单的方法。适用于KindEditor版本4.x及以上。
2972

被折叠的 条评论
为什么被折叠?



