- <script language = "JavaScript">
- KindEditor.ready(function(K) {
- var editor1 = K.create('textarea[name="Content"]', {
- CSSPath : 'kindeditor-4.1.10/plugins/code/prettify.css',
- uploadJson : 'kindeditor-4.1.10/asp/upload_json.asp',
- fileManagerJson : 'kindeditor-4.1.10/asp/file_manager_json.asp',
- 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();
- });
- },
- afterBlur: function(){this.sync();}
- });
- prettyPrint();
- });
- </script>
- //该片段来自于http://www.codesnippet.cn/detail/2805201512699.html
来源: http://www.codesnippet.cn/detail/2805201512699.html