-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
47 lines (42 loc) · 1.2 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
<!doctype html>
<title>CodeMirror: Org mode</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../codemirror/lib/codemirror.css">
<script src="../codemirror/lib/codemirror.js"></script>
<script src="../codemirror/keymap/emacs.js"></script>
<script src="../codemirror/addon/mode/simple.js"></script>
<script src="../codemirror/addon/fold/foldgutter.js"></script>
<link rel="stylesheet" href="../codemirror/addon/fold/foldgutter.css">
<script src="orgmode-mode.js"></script>
<script src="orgmode-fold.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<article>
<h2>Org mode</h2>
<form><textarea id="code" name="code">
* Headline
** Headline 2
:DRAWERNAME:
This is inside the drawer.
:END:
Define a function:
#+BEGIN_SRC
function square(a){
return a*a;
}
console.log(square(4));
#+END_SRC
** Syntax
*Italic* or **Bold**
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
mode: "orgmode",
lineWrapping: true,
keyMap: "emacs",
foldOptions: {
widget: "..."
}
});
</script>
</article>