1.放editor包
2.导入2个javascript
<script charset="utf-8" src="js/editor/kindeditor-min.js"></script>
<script charset="utf-8" src="js/editor/lang/zh_CN.js"></script>
3.写法
<textarea name="contents" id="contents"></textarea>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="contents"]', {
resizeType : 1,
width:'600px',
height:'300PX',
allowPreviewEmoticons : true,
allowImageUpload : false,
// fileManagerJson : '${pageContext.request.contextPath}/message/insert.do',
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
afterCreate : function() {
this.sync();
},
afterBlur:function(){
this.sync();
}
});
});
</script>
4.存在问题
不能接受Ajax提交表单,经过查询加
afterCreate : function() {
this.sync();
},
afterBlur:function(){
this.sync();
}
});
已经解决