我在前台也面定义了两个kindeditor,但是第二个老是提示未定义,应该如何定义两个kindeditor
代码如下
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”

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”

...全文
相关推荐
kindeditor--自定义添加网络视频插件,修改批量图片上传方式flash为h5
kindeditor自定义添加网络视频插件-,修改批量图片上传方式flash为h5上传kindeditor自定义添加网络视频插件-,修改批量图片上传方式flash为h5上传
kindeditor.zip
kindeditor自定义添加网络视频插件,修改批量图片上传方式flash为h5
kindeditor表情插件
自己整合的一个表情插件,他自带的表情个人觉得太难看了
使用JavaScript为Kindeditor自定义按钮增加Audio标签
主要介绍了使用JavaScript为Kindeditor自定义按钮增加Audio标签的方法,KindEditor是一套开源的HTML可视化编辑器,需要的朋友可以参考下
vue集成kindeditor富文本的实现示例代码
主要介绍了vue集成kindeditor富文本的实现示例代码,文中通过示例代码介绍的非常详细,对大家学习或者使用vue具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧


