主题: 同一介面怎样同时使用两个kindeditor编辑器? |
作者: 啊正, 发布日期: 2011-10-02 00:45:41, 浏览数: 4544 |
同一介面怎样同时使用两个kindeditor编辑器? 请各位高手帮忙解答一下,谢谢 KindEditor.ready(function(K) { var formName = 'form1'; var editor1 = K.create('textarea[name="content"]', { id : 'content', cssPath : 'kind/plugins/code/prettify.css', uploadJson : 'kind/php/upload_json.php', fileManagerJson : 'kind/php/file_manager_json.php', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=form1]')[0].submit(); }); } }); var editor2 = K.create('textarea[name="encontent"]', { id : 'encontent', cssPath : 'kind/plugins/code/prettify.css', uploadJson : 'kind/php/upload_json.php', fileManagerJson : 'kind/php/file_manager_json.php', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=form1]')[0].submit(); }); } }); //数据提交 K('input[name=sub]').click(function(e) { if(editor1.isEmpty()==true) { alert ("文章内容不能为空"); editor1.focus(); } else { actions(<? echo $act?>); } }); prettyPrint(); });
|