Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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