resize.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" />
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
  7. <link rel="stylesheet" href="../../css/froala_editor.css">
  8. <link rel="stylesheet" href="../../css/froala_style.css">
  9. <link rel="stylesheet" href="../../css/plugins/table.css">
  10. <style>
  11. body {
  12. text-align: center;
  13. }
  14. section {
  15. width: 81%;
  16. margin: auto;
  17. text-align: left;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <section id="editor">
  23. <div id='edit' style="margin-top: 30px;">
  24. <h1>Resize Table</h1>
  25. <p>The <code>table.min.js</code> plugin also offers the possibility to resize a table in the WYSIWYG HTML editor.
  26. </p>
  27. <table style="width: 100%;">
  28. <tbody>
  29. <tr>
  30. <td style="width: 25%;">
  31. <br>
  32. </td>
  33. <td style="width: 25%;">
  34. <br>
  35. </td>
  36. <td style="width: 25%;">
  37. <br>
  38. </td>
  39. <td style="width: 25%;">
  40. <br>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td style="width: 25%;">
  45. <br>
  46. </td>
  47. <td style="width: 25%;">
  48. <br>
  49. </td>
  50. <td style="width: 25%;">
  51. <br>
  52. </td>
  53. <td style="width: 25%;">
  54. <br>
  55. </td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. <p>There are 2 options that can be used to customize the way table resize works:</p>
  60. <ul>
  61. <li><a href="http://www.froala.dev/wysiwyg-editor/docs/options#tableResizerOffset"
  62. title="tableResizerOffset option" target="_blank">tableResizerOffset</a> - The distance in pixels from the
  63. table cell's left or right border at which to show the resizer.</li>
  64. <li><a href="http://www.froala.dev/wysiwyg-editor/docs/options#tableResizingLimit"
  65. title="tableResizingLimit option" target="_blank">tableResizingLimit</a> - The minimum width in pixels of a
  66. table cell allowed while resizing. The resizer cannot be dragged over this limit.</li>
  67. </ul>
  68. </div>
  69. </section>
  70. <script type="text/javascript" src="../../js/froala_editor.min.js"></script>
  71. <script type="text/javascript" src="../../js/plugins/link.min.js"></script>
  72. <script type="text/javascript" src="../../js/plugins/table.min.js"></script>
  73. <script>
  74. (function () {
  75. new FroalaEditor("#edit", {
  76. toolbarButtons: [ ['bold', 'italic', 'underline', 'strikeThrough', 'table'], ['undo', 'redo'] ],
  77. tableResizerOffset: 10,
  78. tableResizingLimit: 50
  79. })
  80. })()
  81. </script>
  82. </body>
  83. </html>