kindeditor编辑器修改文本后保存时发现获取到的内容还是修改前的文本内容

定义kindeditor的时候要加上一下几个属性设置:

 1 KindEditor.ready(function(K) {
 2         var editor = K.create("textarea[name='content']", {
 3             items : [
 4                 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
 5                 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
 6                 'insertunorderedlist', '|', 'emoticons', 'image', 'link','unlink'],
 7                 afterBlur: function () { editor.sync(); },
 8                 allowFileManager: true,
 9         });
10     });
/*获取内容*/
var content = $("#txtContent").val();
原文地址:https://www.cnblogs.com/zhuzhen/p/7661120.html