标签归档:KindEditor

KindEditor 一个页面多个编辑器只能取到第一个编辑器的值

kindeditor的版本为:4.1.7

以前用过kindeditor,但是没在一个页面有多个编辑器框的。今天刚试了下,使用ajaxForm提交表单,发现Google浏览器下只能获取到第一个值,后来添加 了afterBlur:function(){this.sync();}   Google才全部获取到值!

var fake_prepara_editor;
KindEditor.ready(function(K) {
fake_prepara_editor = K.create('textarea[name="fake_prepara"]',{
      items: toolbars,
      afterCreate : function()
      {
         this.sync();
      },
      afterBlur:function(){ this.sync(); } }); 
}); 
var fake_suffixpara_editor; 
KindEditor.ready(function(K) { 
fake_suffixpara_editor = K.create('textarea[name="fake_suffixpara"]',{ 
      items: toolbars, 
      afterCreate : function() { this.sync(); }, 
      afterBlur:function(){ this.sync(); } }); 
});