content.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
  2. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
  3. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
  4. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
  5. <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.css" rel="stylesheet">
  6. <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.js"></script>
  7. {block name="content"}
  8. <div class="think-box-shadow">
  9. <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
  10. <div class="layui-card-body">
  11. <div class="layui-form-item content" >
  12. <label class="layui-form-label">描述</label>
  13. <div class="layui-input-block">
  14. <textarea id="summernote" name="content">{$vo.content|default=""}</textarea>
  15. </div>
  16. </div>
  17. {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
  18. <div class="layui-form-item text-center">
  19. <button class="layui-btn" type='submit'>保 存</button>
  20. <button class="layui-btn layui-btn-danger" type='button' onclick="history.go(-1)" data-close>返回</button>
  21. </div>
  22. </div>
  23. </form>
  24. </div>
  25. <script>
  26. $('#summernote').summernote({
  27. placeholder:'Hello bootstrap 4',
  28. tabsize:2,
  29. height:700,
  30. width:550,
  31. toolbar:[
  32. // [groupName, [list of button]]
  33. ['style',['bold','italic','underline','clear']],
  34. ['font',['strikethrough','superscript','subscript']],
  35. ['fontsize',['fontsize']],
  36. ['color',['color']],
  37. ['para',['ul','ol','paragraph']],
  38. ['height',['height']]
  39. ]
  40. });
  41. </script>
  42. {/block}