您的位置:首页 > 其它

富文本框

2016-03-15 23:11 417 查看
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 );
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: