Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (4.81 KB)

1
<!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
|!Option|!Syntax|!Output|
20
|bold font|{{{''bold''}}}|''bold''|
21
|italic type|{{{//italic//}}}|//italic//|
22
|underlined text|{{{__underlined__}}}|__underlined__|
23
|strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
24
|superscript text|{{{^^super^^script}}}|^^super^^script|
25
|subscript text|{{{~~sub~~script}}}|~~sub~~script|
26
|highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
27
|preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
28

    
29
!Block Elements
30
!!Headings
31
{{{
32
!Heading 1
33
!!Heading 2
34
!!!Heading 3
35
!!!!Heading 4
36
!!!!!Heading 5
37
}}}
38
<<<
39

    
40
!Heading 1
41

    
42
!!Heading 2
43

    
44
!!!Heading 3
45

    
46
!!!!Heading 4
47

    
48
!!!!!Heading 5
49
<<<
50

    
51
!!Lists
52
{{{
53
* unordered list, level 1
54
** unordered list, level 2
55
*** unordered list, level 3
56

    
57
# ordered list, level 1
58
## ordered list, level 2
59
### unordered list, level 3
60

    
61
; definition list, term
62
: definition list, description
63
}}}
64
<<<
65
* unordered list, level 1
66
** unordered list, level 2
67
*** unordered list, level 3
68

    
69
# ordered list, level 1
70
## ordered list, level 2
71
### unordered list, level 3
72

    
73
; definition list, term
74
: definition list, description
75
<<<
76

    
77
!!Blockquotes
78
{{{
79
> blockquote, level 1
80
>> blockquote, level 2
81
>>> blockquote, level 3
82

    
83
<<<
84
blockquote
85
<<<
86
}}}
87
<<<
88
> blockquote, level 1
89
>> blockquote, level 2
90
>>> blockquote, level 3
91

    
92
> blockquote
93
<<<
94

    
95
!!Preformatted Text
96
<html><pre>
97
{{{
98
preformatted (e.g. code)
99
}}}
100
</pre></html>
101
<<<
102
{{{
103
preformatted (e.g. code)
104
}}}
105
<<<
106

    
107
!!Code Sections
108
{{{
109
Text style code
110
}}}
111

    
112
//{{{
113
JS styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
114
//}}}
115

    
116
<!--{{{-->
117
XML styled code. TiddlyWiki mixed mode should support highlighter switching in the future.
118
<!--}}}-->
119

    
120
!!Tables
121
{{{
122
|CssClass|k
123
|!heading column 1|!heading column 2|
124
|row 1, column 1|row 1, column 2|
125
|row 2, column 1|row 2, column 2|
126
|>|COLSPAN|
127
|ROWSPAN| ... |
128
|~| ... |
129
|CssProperty:value;...| ... |
130
|caption|c
131
}}}
132
''Annotation:''
133
* The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
134
* The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
135
<<<
136
|CssClass|k
137
|!heading column 1|!heading column 2|
138
|row 1, column 1|row 1, column 2|
139
|row 2, column 1|row 2, column 2|
140
|>|COLSPAN|
141
|ROWSPAN| ... |
142
|~| ... |
143
|CssProperty:value;...| ... |
144
|caption|c
145
<<<
146
!!Images /% TODO %/
147
cf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]
148

    
149
!Hyperlinks
150
* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
151
** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
152
* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
153
** 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).
154

    
155
!Custom Styling
156
* {{{@@CssProperty:value;CssProperty:value;...@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
157
* <html><code>{{customCssClass{...}}}</code></html>
158
* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> ... </html>}}}
159

    
160
!Special Markers
161
* {{{<br>}}} forces a manual line break
162
* {{{----}}} creates a horizontal ruler
163
* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
164
* [[HTML entities local|HtmlEntities]]
165
* {{{<<macroName>>}}} calls the respective [[macro|Macros]]
166
* 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.
167
* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
168
</textarea></div>
169

    
170
    <script>
171
      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
172
        mode: 'tiddlywiki',      
173
        lineNumbers: true,
174
        enterMode: 'keep',
175
        matchBrackets: true
176
      });
177
    </script>
178

    
179
    <p>TiddlyWiki mode supports a single configuration.</p>
180

    
181
    <p><strong>MIME types defined:</strong> <code>text/x-tiddlywiki</code>.</p>
182
  </body>
183
</html>