adjustable_height.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-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. <style>
  10. body {
  11. text-align: center;
  12. }
  13. section {
  14. width: 81%;
  15. margin: auto;
  16. text-align: left;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <section id="editor">
  22. <div id='edit' style="margin-top: 30px;">
  23. <h1>Auto-Adjustable Height</h1>
  24. <p>The editor's height will automatically adjust between the <code>heightMin</code> and <code>heightMax</code>
  25. values to fit the content inside the editable area.</p>
  26. <ul>
  27. <li><a href="https://www.froala.com/wysiwyg-editor/docs/options#heightMin" target="_blank"
  28. title="heightMin option">heightMin</a> will prevent the rich text editor&#39;s box being smaller than the
  29. value passed.</li>
  30. <li><a href="https://www.froala.com/wysiwyg-editor/docs/options#heightMax" target="_blank"
  31. title="heightMax option">heightMax</a> will prevent the rich text editor&#39;s box being taller than the
  32. value passed. If the text is too long, then the WYSIWYG HTML editor will get a vertical scrollbar.</li>
  33. </ul>
  34. </div>
  35. </section>
  36. <script type="text/javascript" src="../../js/froala_editor.min.js"></script>
  37. <script type="text/javascript" src="../../js/plugins/lists.min.js"></script>
  38. <script type="text/javascript" src="../../js/plugins/link.min.js"></script>
  39. <script>
  40. (function () {
  41. new FroalaEditor("#edit", {
  42. heightMax: 400,
  43. heightMin: 200
  44. })
  45. })()
  46. </script>
  47. </body>
  48. </html>