KindEditor.ready(function(K) {
var editor = K.create('textarea[name="tvForm.videoIntro"]', {
cssPath : '${ctx }/scripts/kindeditor/plugins/code/prettify.css',
uploadJson : '${ctx }/scripts/kindeditor/jsp/upload_json.jsp',
fileManagerJson : '${ctx }/scripts/kindeditor/jsp/file_manager_json.jsp',
allowFileManager : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
//document.forms['example'].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
//document.forms['example'].submit();
});
},
afterBlur: function () { this.sync(); } //关键是这句话起作用
});
prettyPrint();
});
转载于:https://my.oschina.net/u/151615/blog/153011