diff options
author | Eric Guzman | 2012-02-16 00:22:43 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-16 00:22:43 -0800 |
commit | 82b1a273219f0ae3d119e156c7acccdbe478f441 (patch) | |
tree | 74c45e5e3afc6706b2f7a7918807f72c54cdcfc5 /imports/codemirror/mode/markdown | |
parent | af20ca9b11133dd5cefb9275dbe8fb101c3380d0 (diff) | |
parent | 966f0adaf1d4b7f2dd5a6e31643df58bff713884 (diff) | |
download | ninja-82b1a273219f0ae3d119e156c7acccdbe478f441.tar.gz |
Merge branch 'refs/heads/TreeComponents' into PresetsPanel
Diffstat (limited to 'imports/codemirror/mode/markdown')
-rwxr-xr-x | imports/codemirror/mode/markdown/index.html | 339 | ||||
-rwxr-xr-x | imports/codemirror/mode/markdown/markdown.js | 242 |
2 files changed, 581 insertions, 0 deletions
diff --git a/imports/codemirror/mode/markdown/index.html b/imports/codemirror/mode/markdown/index.html new file mode 100755 index 00000000..3a60c03f --- /dev/null +++ b/imports/codemirror/mode/markdown/index.html | |||
@@ -0,0 +1,339 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Markdown mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="../xml/xml.js"></script> | ||
8 | <script src="markdown.js"></script> | ||
9 | <link rel="stylesheet" href="markdown.css"> | ||
10 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | ||
11 | <link rel="stylesheet" href="../../doc/docs.css"> | ||
12 | </head> | ||
13 | <body> | ||
14 | <h1>CodeMirror: Markdown mode</h1> | ||
15 | |||
16 | <!-- source: http://daringfireball.net/projects/markdown/basics.text --> | ||
17 | <form><textarea id="code" name="code"> | ||
18 | Markdown: Basics | ||
19 | ================ | ||
20 | |||
21 | <ul id="ProjectSubmenu"> | ||
22 | <li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li> | ||
23 | <li><a class="selected" title="Markdown Basics">Basics</a></li> | ||
24 | <li><a href="/projects/markdown/syntax" title="Markdown Syntax Documentation">Syntax</a></li> | ||
25 | <li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li> | ||
26 | <li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li> | ||
27 | </ul> | ||
28 | |||
29 | |||
30 | Getting the Gist of Markdown's Formatting Syntax | ||
31 | ------------------------------------------------ | ||
32 | |||
33 | This page offers a brief overview of what it's like to use Markdown. | ||
34 | The [syntax page] [s] provides complete, detailed documentation for | ||
35 | every feature, but Markdown should be very easy to pick up simply by | ||
36 | looking at a few examples of it in action. The examples on this page | ||
37 | are written in a before/after style, showing example syntax and the | ||
38 | HTML output produced by Markdown. | ||
39 | |||
40 | It's also helpful to simply try Markdown out; the [Dingus] [d] is a | ||
41 | web application that allows you type your own Markdown-formatted text | ||
42 | and translate it to XHTML. | ||
43 | |||
44 | **Note:** This document is itself written using Markdown; you | ||
45 | can [see the source for it by adding '.text' to the URL] [src]. | ||
46 | |||
47 | [s]: /projects/markdown/syntax "Markdown Syntax" | ||
48 | [d]: /projects/markdown/dingus "Markdown Dingus" | ||
49 | [src]: /projects/markdown/basics.text | ||
50 | |||
51 | |||
52 | ## Paragraphs, Headers, Blockquotes ## | ||
53 | |||
54 | A paragraph is simply one or more consecutive lines of text, separated | ||
55 | by one or more blank lines. (A blank line is any line that looks like | ||
56 | a blank line -- a line containing nothing but spaces or tabs is | ||
57 | considered blank.) Normal paragraphs should not be indented with | ||
58 | spaces or tabs. | ||
59 | |||
60 | Markdown offers two styles of headers: *Setext* and *atx*. | ||
61 | Setext-style headers for `<h1>` and `<h2>` are created by | ||
62 | "underlining" with equal signs (`=`) and hyphens (`-`), respectively. | ||
63 | To create an atx-style header, you put 1-6 hash marks (`#`) at the | ||
64 | beginning of the line -- the number of hashes equals the resulting | ||
65 | HTML header level. | ||
66 | |||
67 | Blockquotes are indicated using email-style '`>`' angle brackets. | ||
68 | |||
69 | Markdown: | ||
70 | |||
71 | A First Level Header | ||
72 | ==================== | ||
73 | |||
74 | A Second Level Header | ||
75 | --------------------- | ||
76 | |||
77 | Now is the time for all good men to come to | ||
78 | the aid of their country. This is just a | ||
79 | regular paragraph. | ||
80 | |||
81 | The quick brown fox jumped over the lazy | ||
82 | dog's back. | ||
83 | |||
84 | ### Header 3 | ||
85 | |||
86 | > This is a blockquote. | ||
87 | > | ||
88 | > This is the second paragraph in the blockquote. | ||
89 | > | ||
90 | > ## This is an H2 in a blockquote | ||
91 | |||
92 | |||
93 | Output: | ||
94 | |||
95 | <h1>A First Level Header</h1> | ||
96 | |||
97 | <h2>A Second Level Header</h2> | ||
98 | |||
99 | <p>Now is the time for all good men to come to | ||
100 | the aid of their country. This is just a | ||
101 | regular paragraph.</p> | ||
102 | |||
103 | <p>The quick brown fox jumped over the lazy | ||
104 | dog's back.</p> | ||
105 | |||
106 | <h3>Header 3</h3> | ||
107 | |||
108 | <blockquote> | ||
109 | <p>This is a blockquote.</p> | ||
110 | |||
111 | <p>This is the second paragraph in the blockquote.</p> | ||
112 | |||
113 | <h2>This is an H2 in a blockquote</h2> | ||
114 | </blockquote> | ||
115 | |||
116 | |||
117 | |||
118 | ### Phrase Emphasis ### | ||
119 | |||
120 | Markdown uses asterisks and underscores to indicate spans of emphasis. | ||
121 | |||
122 | Markdown: | ||
123 | |||
124 | Some of these words *are emphasized*. | ||
125 | Some of these words _are emphasized also_. | ||
126 | |||
127 | Use two asterisks for **strong emphasis**. | ||
128 | Or, if you prefer, __use two underscores instead__. | ||
129 | |||
130 | Output: | ||
131 | |||
132 | <p>Some of these words <em>are emphasized</em>. | ||
133 | Some of these words <em>are emphasized also</em>.</p> | ||
134 | |||
135 | <p>Use two asterisks for <strong>strong emphasis</strong>. | ||
136 | Or, if you prefer, <strong>use two underscores instead</strong>.</p> | ||
137 | |||
138 | |||
139 | |||
140 | ## Lists ## | ||
141 | |||
142 | Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`, | ||
143 | `+`, and `-`) as list markers. These three markers are | ||
144 | interchangable; this: | ||
145 | |||
146 | * Candy. | ||
147 | * Gum. | ||
148 | * Booze. | ||
149 | |||
150 | this: | ||
151 | |||
152 | + Candy. | ||
153 | + Gum. | ||
154 | + Booze. | ||
155 | |||
156 | and this: | ||
157 | |||
158 | - Candy. | ||
159 | - Gum. | ||
160 | - Booze. | ||
161 | |||
162 | all produce the same output: | ||
163 | |||
164 | <ul> | ||
165 | <li>Candy.</li> | ||
166 | <li>Gum.</li> | ||
167 | <li>Booze.</li> | ||
168 | </ul> | ||
169 | |||
170 | Ordered (numbered) lists use regular numbers, followed by periods, as | ||
171 | list markers: | ||
172 | |||
173 | 1. Red | ||
174 | 2. Green | ||
175 | 3. Blue | ||
176 | |||
177 | Output: | ||
178 | |||
179 | <ol> | ||
180 | <li>Red</li> | ||
181 | <li>Green</li> | ||
182 | <li>Blue</li> | ||
183 | </ol> | ||
184 | |||
185 | If you put blank lines between items, you'll get `<p>` tags for the | ||
186 | list item text. You can create multi-paragraph list items by indenting | ||
187 | the paragraphs by 4 spaces or 1 tab: | ||
188 | |||
189 | * A list item. | ||
190 | |||
191 | With multiple paragraphs. | ||
192 | |||
193 | * Another item in the list. | ||
194 | |||
195 | Output: | ||
196 | |||
197 | <ul> | ||
198 | <li><p>A list item.</p> | ||
199 | <p>With multiple paragraphs.</p></li> | ||
200 | <li><p>Another item in the list.</p></li> | ||
201 | </ul> | ||
202 | |||
203 | |||
204 | |||
205 | ### Links ### | ||
206 | |||
207 | Markdown supports two styles for creating links: *inline* and | ||
208 | *reference*. With both styles, you use square brackets to delimit the | ||
209 | text you want to turn into a link. | ||
210 | |||
211 | Inline-style links use parentheses immediately after the link text. | ||
212 | For example: | ||
213 | |||
214 | This is an [example link](http://example.com/). | ||
215 | |||
216 | Output: | ||
217 | |||
218 | <p>This is an <a href="http://example.com/"> | ||
219 | example link</a>.</p> | ||
220 | |||