kindeditor使用说明:
要使用tongcat上传功能,需将kindeditor/jsp/lib目录下的3个jar文件复制到Tomcat的lib目录下,并重新启动Tomcat。
* commons-fileupload-1.2.1.jar
* commons-io-1.4.jar
* json_simple-1.1.jar
----Jsp引用方式:
<script charset="utf-8" src="common/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="common/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
var editor1;
KindEditor.ready(function(K) {
editor1 = K.create('textarea[name="mechaniclist"]', {
cssPath : '<%=basePath %>/common/kindeditor/plugins/code/prettify.css',
uploadJson : '<%=basePath %>/common/kindeditor/jsp/upload_json.jsp',
fileManagerJson : '<%=basePath %>/common/kindeditor/jsp/file_manager_json.jsp',
allowFileManager : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
document.forms[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
document.forms[0].submit();
});
}
});
});
</script>
<body>
<textarea id="mechaniclist" name="mechaniclist" cols="120" rows="20" property="hydeptinfo/mechaniclist" value=""><b:write property="hydeptinfo/mechaniclist" /></textarea>
</body>
修改了上传附件错误页面
kindeditor-->jsp-->file_manager_json.jsp和upload_json.jsp页面
含整个代码包
注:kindeditor-->plugins-->code-->prettify.js
提示错误,但不影响正常使用,有知道原因的童鞋帮忙指导
详细内容请参考kindsoft官网:http://www.kindsoft.net/