Project

General

Profile

Statistics
| Revision:

root / trunk / scripts / codemirror / mode / tiddlywiki / index.html @ 229

History | View | Annotate | Download (4.09 KB)

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