01 | KindEditor.ready( function (K) { |
02 | var editor = K.create( 'textarea[name="tvForm.videoIntro"]' , { |
03 | cssPath : '${ctx }/scripts/kindeditor/plugins/code/prettify.css' , |
04 | uploadJson : '${ctx }/scripts/kindeditor/jsp/upload_json.jsp' , |
05 | fileManagerJson : '${ctx }/scripts/kindeditor/jsp/file_manager_json.jsp' , |
06 | allowFileManager : true , |
07 | afterCreate : function () { |
08 | var self = this ; |
09 | K.ctrl(document, 13, function () { |
10 | self.sync(); |
11 | //document.forms['example'].submit(); |
12 | }); |
13 | K.ctrl(self.edit.doc, 13, function () { |
14 | self.sync(); |
15 | //document.forms['example'].submit(); |
16 | }); |
17 | }, |
18 | afterBlur: function () { this .sync(); } //关键是这句话起作用 |
19 | }); |
20 | prettyPrint(); |
21 | }); |