KindEditor调用出错,异常信息如下图

yghuaa yghuaa 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

这个是写的代码,和官网是一样的,怎么会有 Uncaught TypeError: undefined is not a function 这个异常信息呢???
<link rel="stylesheet" href="Kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="Kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="Kindeditor/JS/kindeditor.js"></script>
<script charset="utf-8" src="Kindeditor/JS/zh_CN.js"></script>
<script charset="utf-8" src="Kindeditor/plugins/code/prettify.js"></script>
<script>
var editor1, editor2;
KindEditor.ready(function(K) {
var editor1 = K.create('#BookingInfo', {
cssPath: 'Kindeditor/plugins/code/prettify.css',
uploadJson: 'Kindeditor/upload_json.ashx',
fileManagerJson: 'Kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterCreate: function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=form1]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=form1]')[0].submit();
});
}
});
prettyPrint();
});
KindEditor.ready(function(K) {
var editor2 = K.create('#Description', {
cssPath: 'Kindeditor/plugins/code/prettify.css',
uploadJson: 'Kindeditor/upload_json.ashx',
fileManagerJson: 'Kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterCreate: function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=form1]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=form1]')[0].submit();
});
}
});
prettyPrint();
});

</script>
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
yghuaa
JavaScript 87,983 成员 224,680 内容