1
0

index.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: GFM mode</title>
  6. <link rel="stylesheet" href="../../lib/codemirror.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="../../addon/mode/overlay.js"></script>
  9. <script src="../xml/xml.js"></script>
  10. <script src="../markdown/markdown.js"></script>
  11. <script src="gfm.js"></script>
  12. <!-- Code block highlighting modes -->
  13. <script src="../javascript/javascript.js"></script>
  14. <script src="../css/css.js"></script>
  15. <script src="../htmlmixed/htmlmixed.js"></script>
  16. <script src="../clike/clike.js"></script>
  17. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  18. <link rel="stylesheet" href="../../doc/docs.css">
  19. </head>
  20. <body>
  21. <h1>CodeMirror: GFM mode</h1>
  22. <form><textarea id="code" name="code">
  23. GitHub Flavored Markdown
  24. ========================
  25. Everything from markdown plus GFM features:
  26. ## URL autolinking
  27. Underscores_are_allowed_between_words.
  28. ## Fenced code blocks (and syntax highlighting)
  29. ```javascript
  30. for (var i = 0; i &lt; items.length; i++) {
  31. console.log(items[i], i); // log them
  32. }
  33. ```
  34. ## Task Lists
  35. - [ ] Incomplete task list item
  36. - [x] **Completed** task list item
  37. ## A bit of GitHub spice
  38. * SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  39. * User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  40. * User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  41. * \#Num: #1
  42. * User/#Num: mojombo#1
  43. * User/Project#Num: mojombo/god#1
  44. See http://github.github.com/github-flavored-markdown/.
  45. </textarea></form>
  46. <script>
  47. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  48. mode: 'gfm',
  49. lineNumbers: true,
  50. theme: "default"
  51. });
  52. </script>
  53. <p>Optionally depends on other modes for properly highlighted code blocks.</p>
  54. <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#gfm_*">normal</a>, <a href="../../test/index.html#verbose,gfm_*">verbose</a>.</p>
  55. </body>
  56. </html>