-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.html
47 lines (45 loc) · 1.28 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>
<html>
<head>
<title>Instant Markdown</title>
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
</style>
<link rel="stylesheet" href="github-markdown.css" />
<link rel="stylesheet" href="github-highlight.css" />
<script src="/socket.io/socket.io.js"></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML"
async
></script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
<script>
var socket = io();
socket.on('markdown', function (msg) {
document.getElementById('markdown').innerHTML = msg;
var cursor = document.getElementById('instant-markdown-cursor');
if (cursor) {
cursor.scrollIntoView();
}
mermaid.init();
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
});
socket.on('disconnect', function () {
window.close();
});
</script>
</head>
<body>
<article id="markdown" class="markdown-body"></article>
</body>
</html>