富文本框
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 );
<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 );
相关文章推荐
- 面向对象的代码研究(一)
- jsp
- 找出有环链表中环的入口节点
- 设计模式之------创建型模式(五)-----原型模式
- VK Cup 2016 - Qualification Round 1——A. Voting for Photos(queue+map)
- Verilog 参数化设计
- Ajax前台请求 以及 后台 Java 处理 (包含undefined的问题)
- Linux 总结
- js之闭包
- java连接数据库常见错误总结
- StringTokenizer和Split性能比较
- liunx下两种方式安装MySQL源码和RPM方式
- Java Bean简单介绍
- C#中??操作符和?操作符
- JavaScript学习(1)
- 借鉴DP思想: HouseRobberIII
- Software Testing hw2
- Lucene教程
- [Audio processing] wav音频文件合并
- 1001