Kindeditor使用常见问题
最近在使用Kindeditor,但是出现了些问题,不过最终都解决了,所以在此分享下也记录下
var editor;KindEditor.ready(function(K) {editor = K.create('textarea[name="answer"]', {cssPath : '<%=request.getContextPath()%>/kindeditor/plugins/code/prettify.css',uploadJson : '<%=request.getContextPath()%>/kindeditor/jsp/upload_json.jsp',fileManagerJson : '<%=request.getContextPath()%>/kindeditor/jsp/file_manager_json.jsp',allowFileManager : true,afterCreate : function() {var self = this;K.ctrl(document, 13, function() {self.sync();document.forms['problemForm'].submit();});K.ctrl(self.edit.doc, 13, function() {self.sync();document.forms['problemForm'].submit();});}});prettyPrint();});editor.fullscreen();liger = $.ligerDialog.open({target: $("#editInfo") , title: '编辑', width: 720, height: 600 ,buttons: [{ text: '确定', onclick: function (item, dialog) { sub(); } }] });editor.fullscreen();[color=red]$("#answer").val(editor.html());[/color]$("#problemForm").submit();String savePath = pageContext.getServletContext().getRealPath("/") + "/attached/";