index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!doctype html>
  2. <title>CodeMirror: TiddlyWiki mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <link rel="stylesheet" href="tiddlywiki.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="../../addon/edit/matchbrackets.js"></script>
  9. <script src="tiddlywiki.js"></script>
  10. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  11. <div id=nav>
  12. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  13. <ul>
  14. <li><a href="../../index.html">Home</a>
  15. <li><a href="../../doc/manual.html">Manual</a>
  16. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  17. </ul>
  18. <ul>
  19. <li><a href="../index.html">Language modes</a>
  20. <li><a class=active href="#">TiddlyWiki</a>
  21. </ul>
  22. </div>
  23. <article>
  24. <h2>TiddlyWiki mode</h2>
  25. <div><textarea id="code" name="code">
  26. !TiddlyWiki Formatting
  27. * Rendered versions can be found at: http://www.tiddlywiki.com/#Reference
  28. |!Option | !Syntax |
  29. |bold font | ''bold'' |
  30. |italic type | //italic// |
  31. |underlined text | __underlined__ |
  32. |strikethrough text | --strikethrough-- |
  33. |superscript text | super^^script^^ |
  34. |subscript text | sub~~script~~ |
  35. |highlighted text | @@highlighted@@ |
  36. |preformatted text | {{{preformatted}}} |
  37. !Block Elements
  38. <<<
  39. !Heading 1
  40. !!Heading 2
  41. !!!Heading 3
  42. !!!!Heading 4
  43. !!!!!Heading 5
  44. <<<
  45. !!Lists
  46. <<<
  47. * unordered list, level 1
  48. ** unordered list, level 2
  49. *** unordered list, level 3
  50. # ordered list, level 1
  51. ## ordered list, level 2
  52. ### unordered list, level 3
  53. ; definition list, term
  54. : definition list, description
  55. <<<
  56. !!Blockquotes
  57. <<<
  58. > blockquote, level 1
  59. >> blockquote, level 2
  60. >>> blockquote, level 3
  61. > blockquote
  62. <<<
  63. !!Preformatted Text
  64. <<<
  65. {{{
  66. preformatted (e.g. code)
  67. }}}
  68. <<<
  69. !!Code Sections
  70. <<<
  71. {{{
  72. Text style code
  73. }}}
  74. //{{{
  75. JS styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
  76. //}}}
  77. <!--{{{-->
  78. XML styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
  79. <!--}}}-->
  80. <<<
  81. !!Tables
  82. <<<
  83. |CssClass|k
  84. |!heading column 1|!heading column 2|
  85. |row 1, column 1|row 1, column 2|
  86. |row 2, column 1|row 2, column 2|
  87. |>|COLSPAN|
  88. |ROWSPAN| ... |
  89. |~| ... |
  90. |CssProperty:value;...| ... |
  91. |caption|c
  92. ''Annotation:''
  93. * The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
  94. * The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
  95. <<<
  96. !!Images /% TODO %/
  97. cf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]
  98. !Hyperlinks
  99. * [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
  100. ** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
  101. * [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
  102. ** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).
  103. !Custom Styling
  104. * {{{@@CssProperty:value;CssProperty:value;...@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
  105. * <html><code>{{customCssClass{...}}}</code></html>
  106. * raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> ... </html>}}}
  107. !Special Markers
  108. * {{{<br>}}} forces a manual line break
  109. * {{{----}}} creates a horizontal ruler
  110. * [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
  111. * [[HTML entities local|HtmlEntities]]
  112. * {{{<<macroName>>}}} calls the respective [[macro|Macros]]
  113. * To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
  114. * To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
  115. </textarea></div>
  116. <script>
  117. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  118. mode: 'tiddlywiki',
  119. lineNumbers: true,
  120. matchBrackets: true
  121. });
  122. </script>
  123. <p>TiddlyWiki mode supports a single configuration.</p>
  124. <p><strong>MIME types defined:</strong> <code>text/x-tiddlywiki</code>.</p>
  125. </article>