This repository has been archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
269 lines (191 loc) · 8.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Markdown-Editor</title>
<link href="jQuery/jquery-ui-1.10.2.css" media="all" rel="stylesheet" type="text/css" />
<link href="CodeMirror/lib/codemirror.css" media="all" rel="stylesheet" type="text/css" />
<link href="css.css" media="all" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jQuery/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jQuery/jquery-ui-1.10.2.min.js"></script>
<script type="text/javascript" src="jQuery/jquery.base64.min.js"></script>
<script type="text/javascript" src="CodeMirror/lib/codemirror.js"></script>
<script type="text/javascript" src="CodeMirror/addon/mode/overlay.js"></script>
<script type="text/javascript" src="CodeMirror/addon/selection/active-line.js"></script>
<script type="text/javascript" src="CodeMirror/addon/search/searchcursor.js"></script>
<script type="text/javascript" src="CodeMirror/addon/search/match-highlighter.js"></script>
<script type="text/javascript" src="codemirror.plugins.js"></script>
<script type="text/javascript" src="CodeMirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="CodeMirror/mode/ruby/ruby.js"></script>
<script type="text/javascript" src="CodeMirror/mode/css/css.js"></script>
<script type="text/javascript" src="CodeMirror/mode/xml/xml.js"></script>
<script type="text/javascript" src="CodeMirror/mode/markdown/markdown.js"></script>
<script type="text/javascript" src="CodeMirror/mode/gfm/gfm.js"></script>
<script type="text/javascript" src="marked/lib/marked.js"></script>
<script type="text/javascript" src="keymaster/keymaster.min.js"></script>
<script type="text/javascript" src="jquery.plugins.js"></script>
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<div id="markdown-input">
<textarea class="markdown-input" data-markdown-preview="#markdown-preview" cols="40" rows="20">
#Markdown-Editor
##github
https://github.com/miclle/Markdown-Editor
##Demo
http://markdown.miclle.com/
##Key Bindings
* Strong: Select text, Cmd + B / Ctrl + B
* Emphasize: Select text, Cmd + I / Ctrl + I
* Inline Code: Select text, Cmd + K / Ctrl + K
* Strikethrough: Select text, Cmd + U / Ctrl + U
* Convert to H1: Cmd + 1 / Ctrl + 1
* Convert to H2: Cmd + 2 / Ctrl + 2
* Convert to H3: Cmd + 3 / Ctrl + 3
* Convert to H4: Cmd + 4 / Ctrl + 4
* Convert to H5: Cmd + 5 / Ctrl + 5
* Convert to H6: Cmd + 6 / Ctrl + 6
* Save Markdown Content: Cmd + S / Ctrl + S
##Tab fast keys
* Insert link tag: `[Title text](http://sample.com/)` : a + Tab
* Insert image tag: `![Alt text](https://sample.com/)`: i + Tab
##Require libs
* CodeMirror http://codemirror.net
* marked https://github.com/chjj/marked
* jQuery http://jquery.com/ http://jqueryui.com/
##Icon:
![Caribbean blue download 4 icon](https://raw.github.com/miclle/Markdown-Editor/master/imgs/download.png) http://www.iconsdb.com/caribbean-blue-icons/download-4-icon.html
##MIT License
---
GitHub Flavored Markdown
================================
*View the [source of this content](http://github.github.com/github-flavored-markdown/sample_content.html).*
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red
Violets are blue
The next paragraph has the same phrases, but now they are separated by two spaces and a newline character:
Roses are red
Violets are blue
Oh, and one thing I cannot stand is the mangling of words with multiple underscores in them like perform_complicated_task or do_this_and_do_that_and_another_thing.
A bit of the GitHub spice
-------------------------
In addition to the changes in the previous section, certain references are auto-linked:
* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* \#Num: #1
* User/#Num: mojombo#1
* User/Project#Num: mojombo/god#1
These are dangerous goodies though, and we need to make sure email addresses don't get mangled:
My email addy is tom@github.com.
Math is hard, let's go shopping
-------------------------------
In first grade I learned that 5 > 3 and 2 < 7. Maybe some arrows. 1 -> 2 -> 3. 9 <- 8 <- 7.
Triangles man! a^2 + b^2 = c^2
We all like making lists
------------------------
The above header should be an H2 tag. Now, for a list of fruits:
* Red Apples
* Purple Grapes
* Green Kiwifruits
Let's get crazy:
1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.
2. Suspendisse id sem consectetuer libero luctus adipiscing.
What about some code **in** a list? That's insane, right?
1. In Ruby you can map like this:
['a', 'b'].map { |x| x.uppercase }
2. In Rails, you can do a shortcut:
['a', 'b'].map(&:uppercase)
Some people seem to like definition lists
<dl>
<dt>Lower cost</dt>
<dd>The new version of this product costs significantly less than the previous one!</dd>
<dt>Easier to use</dt>
<dd>We've changed the product so that it's much easier to use!</dd>
</dl>
I am a robot
------------
Maybe you want to print `robot` to the console 1000 times. Why not?
def robot_invasion
puts("robot " * 1000)
end
You see, that was formatted as code because it's been indented by four spaces.
How about we throw some angle braces and ampersands in there?
<div class="footer">
© 2004 Foo Corporation
</div>
Set in stone
------------
Preformatted blocks are useful for ASCII art:
<pre>
,-.
, ,-. ,-.
/ \ ( )-( )
\ | ,.>-( )-<
\|,' ( )-( )
Y ___`-' `-'
|/__/ `-'
|
|
| -hrr-
___|_____________
</pre>
Playing the blame game
----------------------
If you need to blame someone, the best way to do so is by quoting them:
> I, at any rate, am convinced that He does not throw dice.
Or perhaps someone a little less eloquent:
> I wish you'd have given me this written question ahead of time so I
> could plan for it... I'm sure something will pop into my head here in
> the midst of this press conference, with all the pressure of trying to
> come up with answer, but it hadn't yet...
>
> I don't want to sound like
> I have made no mistakes. I'm confident I have. I just haven't - you
> just put me under the spot here, and maybe I'm not as quick on my feet
> as I should be in coming up with one.
Table for two
-------------
<table>
<tr>
<th>ID</th><th>Name</th><th>Rank</th>
</tr>
<tr>
<td>1</td><td>Tom Preston-Werner</td><td>Awesome</td>
</tr>
<tr>
<td>2</td><td>Albert Einstein</td><td>Nearly as awesome</td>
</tr>
</table>
Crazy linking action
--------------------
I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"</textarea>
</div>
<div id="markdown-preview" class="markdown-body">
Preview content
</div>
<div id="download-box">
<a href="javascript:void(0);" download="markdown.md"><img src="imgs/download.png" alt="download" /></a>
</div>
<a id="fork-me-on-github" href="https://github.com/miclle" target="_blank"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8236884-6']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>