代码如下
var editor1,editor2;
KindEditor.ready(function () {
editor1 = KindEditor.create('#txtDesc', {
cssPath: 'kindeditor/plugins/code/prettify.css',
uploadJson: 'kindeditor/asp.net/upload_json.ashx',
fileManagerJson: 'kindeditor/asp.net/file_manager_json.ashx',
allowFileManager: true,
syncType: "auto",
afterCreate: function () {
var self = this;
KindEditor.ctrl(document, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
KindEditor.ctrl(self.edit.doc, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
},
afterChange: function () { this.sync(); },
afterBlur: function () { editor1.sync(); }
});
var editor2 = KindEditor.create('#TextDesc', {
cssPath: 'kindeditor/plugins/code/prettify.css',
uploadJson: 'kindeditor/asp.net/upload_json.ashx',
fileManagerJson: 'kindeditor/asp.net/file_manager_json.ashx',
allowFileManager: true,
syncType: "auto",
afterCreate: function () {
var self = this;
KindEditor.ctrl(document, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
KindEditor.ctrl(self.edit.doc, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
},
afterChange: function () { editor2.sync(); },
afterBlur: function () { editor2.sync(); }
});
prettyPrint();
});
0x800a138f - JavaScript 运行时错误: 无法获取未定义或 null 引用的属性“html”
