1.HTML代码:
<tr id="illegal">
<th></th>
<td colspan="3" style="width:85%">
<textarea id="illegaleditor" name="report.illegal" style="width:98%;height:250px;">
</textarea>
</td>
</tr>
2.JS代码
需要引入‘${basePath}/s/js/kindeditor/kindeditor.js‘
var illegaleditor = "illegaleditor";
setTimeout(function () {
illegalEditor = KindEditor.create(‘#‘ + illegaleditor, {
resizeType: 1,
uploadJson: ‘kindeditor/upload_json.ashx‘,
fileManagerJson: ‘kindeditor/file_manager_json.ashx‘,
allowPreviewEmoticons: false,
allowImageUpload: false,
items: [
‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘, ‘hilitecolor‘, ‘bold‘, ‘italic‘, ‘underline‘,
‘removeformat‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘, ‘insertorderedlist‘,
‘insertunorderedlist‘, ‘|‘, ‘emoticons‘, ‘link‘]
});
}, 0);
3.修改和详情赋值
success:function(text){
var modData = nui.decode(text);
illegaleditor .html(modData.illegaleditor );
原文:http://www.cnblogs.com/fenghua12/p/5281694.html