先贴出代码
pageEncoding="UTF-8"%>
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
Integer userType = 0;
%>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
resizeType : 1,
allowPreviewEmoticons : false,
items : [ 'source', '', 'undo','redo','','formatblock','fontname', 'fontsize', '',
'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'strikethrough','removeformat', '', 'justifyleft', 'justifycenter',
'justifyright', 'insertorderedlist','insertunorderedlist','insertorderedlist',
'insertunorderedlist', '', 'emoticons', 'image', 'link','table','hr','preview'],
});
//清空KindEditor, 0表示第一个KindEditor编辑器对象
KindEditor.instances[0].html("");
});
function save(){
//获取文本框的值
editor.sync();
var html = document.getElementById('saveId').value;
alert(html);
document.forms[0].action="fileSaveAction.action?html="+html;
document.forms[0].submit;
}