2
0

variableheight.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: Variable Height Demo</title>
  6. <link rel="stylesheet" href="../lib/codemirror.css">
  7. <script src="../lib/codemirror.js"></script>
  8. <script src="../mode/markdown/markdown.js"></script>
  9. <script src="../mode/xml/xml.js"></script>
  10. <link rel="stylesheet" href="../doc/docs.css">
  11. <style type="text/css">
  12. .CodeMirror {border: 1px solid silver; border-width: 1px 2px; }
  13. .cm-header { font-size: 150%; font-family: arial; }
  14. .cm-strong { font-size: 140%; }
  15. </style>
  16. </head>
  17. <body>
  18. <h1>CodeMirror: Variable Height Demo</h1>
  19. <form><textarea id="code" name="code"># A First Level Header
  20. **Bold** text in a normal-size paragraph.
  21. 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.
  22. ## A Second Level Header
  23. Now is the time for all good men to come to
  24. the aid of their country. This is just a
  25. regular paragraph.
  26. The quick brown fox jumped over the lazy
  27. dog's back.
  28. ### Header 3
  29. > This is a blockquote.
  30. >
  31. > This is the second paragraph in the blockquote.
  32. >
  33. > ## This is an H2 in a blockquote
  34. </textarea></form>
  35. <script id="script">
  36. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  37. lineNumbers: true,
  38. lineWrapping: true,
  39. mode: "markdown"
  40. });
  41. </script>
  42. </body>
  43. </html>