You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.0 KiB

7 months ago
  1. <!doctype html>
  2. <title>CodeMirror: Variable Height Demo</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../doc/docs.css">
  5. <link rel="stylesheet" href="../lib/codemirror.css">
  6. <script src="../lib/codemirror.js"></script>
  7. <script src="../mode/markdown/markdown.js"></script>
  8. <script src="../mode/xml/xml.js"></script>
  9. <style>
  10. .CodeMirror {border: 1px solid silver; border-width: 1px 2px; }
  11. .cm-header { font-family: arial; }
  12. .cm-header-1 { font-size: 150%; }
  13. .cm-header-2 { font-size: 130%; }
  14. .cm-header-3 { font-size: 120%; }
  15. .cm-header-4 { font-size: 110%; }
  16. .cm-header-5 { font-size: 100%; }
  17. .cm-header-6 { font-size: 90%; }
  18. .cm-strong { font-size: 140%; }
  19. </style>
  20. <div id=nav>
  21. <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>
  22. <ul>
  23. <li><a href="../index.html">Home</a>
  24. <li><a href="../doc/manual.html">Manual</a>
  25. <li><a href="https://github.com/codemirror/codemirror5">Code</a>
  26. </ul>
  27. <ul>
  28. <li><a class=active href="#">Variable Height</a>
  29. </ul>
  30. </div>
  31. <article>
  32. <h2>Variable Height Demo</h2>
  33. <form><textarea id="code" name="code"># A First Level Header
  34. **Bold** text in a normal-size paragraph.
  35. And a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long, wrapped line with a piece of **big** text inside of it.
  36. ## A Second Level Header
  37. Now is the time for all good men to come to
  38. the aid of their country. This is just a
  39. regular paragraph.
  40. The quick brown fox jumped over the lazy
  41. dog's back.
  42. ### Header 3
  43. > This is a blockquote.
  44. >
  45. > This is the second paragraph in the blockquote.
  46. >
  47. > ## This is an H2 in a blockquote
  48. </textarea></form>
  49. <script id="script">
  50. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  51. lineNumbers: true,
  52. lineWrapping: true,
  53. mode: "markdown"
  54. });
  55. </script>
  56. </article>