/
pbe-index.html
75 lines (53 loc) · 3.06 KB
/
pbe-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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>hypermd-twemoji</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<textarea id="input-box" cols="30" rows="10"># hypermd-twemoji
[GitHub](https://github.com/HyperMD/hypermd-twemoji) | [![NPM version](https://img.shields.io/npm/v/hypermd-twemoji.svg?style=flat-square)](https://npmjs.org/package/hypermd-twemoji)
I'm using twemoji to render emojis! :tada:</textarea>
<p>Emoji icons provided free by <a href="https://twemoji.twitter.com/">twemoji</a></p>
<!-- ----------------------------------------------------------------------------------- -->
<!-- CodeMirror -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codemirror/addon/fold/foldgutter.css">
<script src="https://cdn.jsdelivr.net/npm/codemirror/lib/codemirror.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/addon/fold/foldcode.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/addon/fold/foldgutter.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/addon/fold/markdown-fold.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/addon/mode/overlay.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/meta.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/markdown/markdown.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/xml/xml.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/stex/stex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/yaml/yaml.js"></script>
<script src="https://cdn.jsdelivr.net/npm/codemirror/mode/javascript/javascript.js"></script>
<!-- load more for code blocks -->
<!-- ----------------------------------------------------------------------------------- -->
<!-- HyperMD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hypermd/mode/hypermd.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hypermd/theme/hypermd-light.css">
<script src="https://cdn.jsdelivr.net/npm/hypermd/ai1.js"></script>
<!-- ----------------------------------------------------------------------------------- -->
<!-- twemoji and hypermd-twemoji -->
<script src="https://cdn.jsdelivr.net/npm/twemoji/2/twemoji.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hypermd-twemoji/index.js"></script>
<!-- ----------------------------------------------------------------------------------- -->
<!-- Let's ROCK -->
<script>
var myTextarea = document.getElementById('input-box')
var editor = HyperMD.fromTextArea(myTextarea, {
// for code fence highlighting
hmdModeLoader: "https://cdn.jsdelivr.net/npm/codemirror/",
})
// and that's all
// now you get a `editor` and you can do whatever you want
editor.setSize(null, "900px") // set height
editor.focus()
</script>
</body>
</html>