templetAdd.jsp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <form id="addTempletForm" method="post">
  4. <table class="mytable" style="width: 100%;">
  5. <tr>
  6. <th width="15%">模板标题</th>
  7. <td width="85%" colspan="3" >
  8. <input class="easyui-validatebox" required="true" type="text" id="title_add" name="templet.title" style="width:545px">
  9. </td>
  10. </tr>
  11. <tr>
  12. <th width="15%">模板类型</th>
  13. <td width="85%" colspan="3" >
  14. <select name="templet.templetType" id="templetType_add" class="easyui-validatebox" required="true">
  15. <option value="">请选择</option>
  16. </select>
  17. </td>
  18. </tr>
  19. <tr>
  20. <th>模板内容</th>
  21. <td colspan="3">
  22. <textarea id="editor_content" name="templet.content" rows="20" cols="100" style="width: 95%; height: 400px;"></textarea>
  23. </td>
  24. </tr>
  25. </table>
  26. </form>
  27. <script type="text/javascript">
  28. KindEditor.ready(function(K) {
  29. var options = {
  30. //自定义工具栏
  31. items : [ 'source', 'plainpaste', 'wordpaste', 'preview', '|',
  32. 'fontname', 'fontsize', '|',
  33. 'forecolor', 'hilitecolor', 'bold',
  34. 'italic', 'underline', 'removeformat', '|',
  35. 'clearhtml', 'selectall','|',
  36. 'justifyleft', 'justifycenter', 'justifyright',
  37. 'indent','outdent','insertorderedlist', 'insertunorderedlist', '|',
  38. 'image', "multiimage", 'insertfile', '|',
  39. 'table', 'baidumap' ],
  40. //图片上传Action
  41. uploadJson : whzl.basePath+'/imgUpload_imgUpload',
  42. //允许网络图片上传
  43. allowImageRemote : true,
  44. //文件空间Action
  45. fileManagerJson : whzl.basePath+'/fileManager_fileManager',
  46. //允许展示文件空间
  47. allowFileManager : true,
  48. //过滤代码样式参数
  49. filterMode : false,
  50. //kindeditor创建后,将编辑器的内容设置到原来的textarea控件里
  51. afterCreate : function(){ this.sync(); },
  52. //编辑器聚焦后,将编辑器的内容设置到原来的textarea控件里
  53. afterBlur: function(){ this.sync(); },
  54. //编辑器内容发生变化后,将编辑器的内容设置到原来的textarea控件里
  55. afterChange: function(){ this.sync(); }
  56. };
  57. editor = K.create('#editor_content', options);
  58. });
  59. </script>