-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·111 lines (88 loc) · 2.98 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<title>Markdown Wechat Public</title>
<link rel="stylesheet" href="css/custom-ui.css"/>
<link rel="stylesheet" href="css/normalize.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/basic-ui.css"/>
<link rel="stylesheet" href="css/highlight.min.css"/>
<link rel="stylesheet" href="css/github-light.css"/>
<script src="js/showdown.min.js"></script>
<script src="js/showdown-plugins/showdown-prettify-for-wechat.js"></script>
<script src="js/jquery-3.1.1.js"></script>
<script src="js/clipboard.min.js"></script>
<link rel="stylesheet" href="google-code-prettify/prettify.css"/>
<script src="google-code-prettify/run_prettify.js"></script>
<link rel="stylesheet" href="themes/tomorrow-night-eighties.css"/>
<link rel="stylesheet" href="css/wechat-fix.css"/>
<script>
(function () {
var input, output;
var converter = new showdown.Converter({extensions: ['prettify']});
function updateOutput() {
output.innerHTML = converter.makeHtml(input.value);
PR.prettyPrint();
}
document.addEventListener("DOMContentLoaded", function (event) {
input = document.getElementById('input');
output = document.getElementById('output');
input.addEventListener('input', updateOutput, false);
input.addEventListener('keydown', updateOutput, false);
updateOutput();
});
})();
$('document').ready(function () {
new Clipboard('.btn');
});
</script>
</head>
<body>
<div class="row cf">
<div class="col">
<div class="header">
<h2>Markdown</h2>
</div>
<textarea id="input" cols="100" rows="10">## 公众号 Phodal 专用编辑器
> Inspired by [to-markdown](https://github.com/domchristie/to-markdown)
更多精彩内容请关注:

下面是一个列表的示例:
1. number li
2. number li
3. number li
- 今天天所好啊
- ol
- A Markdown Editor for Wechat Public
<h3 id="headline">small headline</h3>
<h2 id="headline">Larger Headline</h2>
A Markdown Editor for Wechat Public
```javascript
(function() {
var input, output;
var converter = new showdown.Converter();
function updateOutput() {
output.innerHTML = converter.makeHtml(input.value);
}
document.addEventListener("DOMContentLoaded", function(event) {
input = document.getElementById('input');
output = document.getElementById('output');
input.addEventListener('input', updateOutput, false);
input.addEventListener('keydown', updateOutput, false);
updateOutput();
});
})();
```
</textarea>
</div>
<div class="col">
<div class="header">
<button class="btn button" data-clipboard-action="cut" data-clipboard-target="#output">复制</button>
</div>
<div id="output"></div>
</div>
</div>
</body>
</html>