1个回答
展开全部
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="content"]', {
cssPath: '../js/kindeditor/plugins/code/prettify.css',
uploadJson: '../js/kindeditor/upload_json.ashx',
fileManagerJson: '../js/kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
}
});
prettyPrint();
});
红色部分调整为以下编码
KindEditor.ready(function(K) {
var editor = K.create('textarea[id="content"]', {
cssPath: '../js/kindeditor/plugins/code/prettify.css',
uploadJson: '../js/kindeditor/upload_json.ashx',
fileManagerJson: '../js/kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterBlur : function() {
this.sync();
K.ctrl(document, 13, function() {
K('form[name=myform]')[0].submit();
});
K.ctrl(this.edit.doc, 13, function() {
K('form[name=myform]')[0].submit();
});
}
});
prettyPrint();
});
var editor = K.create('textarea[name="content"]', {
cssPath: '../js/kindeditor/plugins/code/prettify.css',
uploadJson: '../js/kindeditor/upload_json.ashx',
fileManagerJson: '../js/kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=myform]')[0].submit();
});
}
});
prettyPrint();
});
红色部分调整为以下编码
KindEditor.ready(function(K) {
var editor = K.create('textarea[id="content"]', {
cssPath: '../js/kindeditor/plugins/code/prettify.css',
uploadJson: '../js/kindeditor/upload_json.ashx',
fileManagerJson: '../js/kindeditor/file_manager_json.ashx',
allowFileManager: true,
afterBlur : function() {
this.sync();
K.ctrl(document, 13, function() {
K('form[name=myform]')[0].submit();
});
K.ctrl(this.edit.doc, 13, function() {
K('form[name=myform]')[0].submit();
});
}
});
prettyPrint();
});
追问
这段代码我有写完整,但是还是提取不到数据。还有共它可能吗
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询