富文本插件的使用

富文本:

在WebRoot目录下放入插件(插件在云盘中下载或者百度自行搜索)

在<head></head>里附上:
<script charset="utf-8" src="<%=basePath %>kindeditor-4.1.10/kindeditor.js"></script>
<script charset="utf-8" src="<%=basePath %>kindeditor-4.1.10/lang/zh-CN.js"></script>
<script type="text/javascript">
//KindEditor插件
KindEditor.ready(function(K) {
editor = K.create('textarea[name="XXXXXX"]', {
allowFileManager : true,
autoHeightMode : false ,
height : "500px",
"50%",
themeType:'common',
uploadJson :'<%=request.getContextPath()%>/kindeditor-4.1.10/jsp/upload_json.jsp',
fileManagerJson : '<%=request.getContextPath()%>/kindeditor-4.1.10/jsp/upload_json.jsp',
afterCreate : function() {
this.loadPlugin('autoheight');
},
afterBlur:function(){this.sync();}
});
});
</script>
<style>.weui_btn_dialog.default{display: none;}</style>

在body中用textarea文本框,name="XXXXXX"

原文地址:https://www.cnblogs.com/zhangyong0908/p/9114877.html