标签:编辑器
首先将下载的KindEditor包放到WebRoot下,该包下的文件有如下:
第二、在页面中引入相关css和js
<link rel="stylesheet" href="/KindEditor/themes/default/default.css" /> <link rel="stylesheet" href="/KindEditor/plugins/code/prettify.css" /> <script charset="utf-8" src="/KindEditor/kindeditor.js"></script> <script charset="utf-8" src="/KindEditor/lang/zh_CN.js"></script> <script charset="utf-8" src="/KindEditor/plugins/code/prettify.js"></script>
KindEditor.ready(function(K) { editor1 = K.create('textarea[name="body"]', { cssPath : '/KindEditor/plugins/code/prettify.css', uploadJson : '/KindEditor/jsp/upload_json.jsp', fileManagerJson : '/KindEditor/jsp/file_manager_json.jsp', allowFileManager : true, items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'multiimage', 'link' , 'table'], afterBlur:function(){this.sync();} }); });
下图为简单模式样式:
标签:编辑器
原文地址:http://blog.csdn.net/lv_shijun/article/details/39206173