-
Notifications
You must be signed in to change notification settings - Fork 1
/
static-hedgedoc-demo.html
72 lines (68 loc) · 3.09 KB
/
static-hedgedoc-demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Static HedgeDoc</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/fontawesome-all.css">
<link rel="stylesheet" href="js/hljs/styles/github.css">
<link rel="stylesheet" href="css/github-extract.css">
<link rel="stylesheet" href="js/marks-plugins/lib/KaTeX/katex.css">
<link rel="stylesheet" href="css/markdown.css">
<link rel="stylesheet" href="css/static-hedgedoc.css">
<script type="importmap">
{
"imports" : {
"markdown-it": "./js/markdown-it",
"mdurl": "./js/mdurl",
"linkify-it": "./js/linkify-it",
"punycode.js": "./js/punycodejs/punycode.es6.js",
"uc.micro": "./js/ucmicro",
"entities": "./js/entities",
"html-entities": "./js/html-entities/lib",
"@mrdrogdrog/optional": "./js/optional",
"hedgedoc-markdown-plugins": "./js/hedgedoc-markdown-plugins",
"markdown-it-emoji": "./js/markdown-it-emoji",
"markdown-it-regexp": "./js/markdown-it-regexp",
"markdown-it-container": "./js/markdown-it-container",
"markdown-it-abbr": "./js/markdown-it-abbr",
"markdown-it-footnote": "./js/markdown-it-footnote",
"markdown-it-mark": "./js/markdown-it-mark",
"markdown-it-sub": "./js/markdown-it-sub",
"markdown-it-sup": "./js/markdown-it-sup",
"markdown-it-ins": "./js/markdown-it-ins",
"markdown-it-deflist": "./js/markdown-it-deflist",
"markdown-it-for-inline": "./js/markdown-it-for-inline",
"markdown-it-anchor": "./js/markdown-it-anchor",
"marks-plugins": "./js/marks-plugins",
"hljs": "./js/hljs/es/core.min.js",
"lean-qr": "./js/lean-qr/build/index.mjs",
"lean-qr-svg": "./js/lean-qr/build/extras/svg.mjs",
"papaparse": "./js/papaparse.min.mjs",
"mermaid": "./js/mermaid/mermaid.esm.min.mjs"
}
}
</script>
</head>
<body>
<div id="markdown-body" class="markdown-body container-fluid">
</div>
<script src="js/markdown-it-multimd-table/dist/markdown-it-multimd-table.js"></script>
<script type="module" src="js/static-hedgedoc.js"></script>
<script type="module">
// Default markdown file
const mdfile = new URLSearchParams(window.location.search).get('mdfile') || 'static-hedgedoc-demo.md';
try {
await window.md.preProcess();
const response = await fetch(mdfile);
const text = await response.text();
const html = await window.md.render(text);
document.getElementById('markdown-body').innerHTML = html;
window.md.postProcess();
} catch (error) {
console.error('An error...:', error);
}
</script>
</body>
</html>