forked from TruthHun/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnote.html
More file actions
119 lines (116 loc) · 4.61 KB
/
note.html
File metadata and controls
119 lines (116 loc) · 4.61 KB
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
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<title>{{.SeoTitle}}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="{{$.StaticDomain}}/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="{{$.StaticDomain}}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="{{$.StaticDomain}}/static/jstree/3.3.4/themes/default/style.min.css" rel="stylesheet">
<link href="{{$.StaticDomain}}/static/editor.md/css/editormd.css" rel="stylesheet">
<link href="{{$.StaticDomain}}/static/highlight/styles/zenburn.css" rel="stylesheet">
<link href="{{$.StaticDomain}}/static/webuploader/webuploader.css" rel="stylesheet">
<link href="/static/css/markdown.css" rel="stylesheet">
<link href="/static/css/markdown.preview.css" rel="stylesheet">
</head>
<body>
<div id="NoteEditor"></div>
<script src="{{$.StaticDomain}}/static/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="{{$.StaticDomain}}/static/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="{{$.StaticDomain}}/static/webuploader/webuploader.min.js" type="text/javascript"></script>
<script src="{{$.StaticDomain}}/static/editor.md/editormd.js" type="text/javascript"></script>
<script src="{{$.StaticDomain}}/static/layer/layer.js" type="text/javascript" ></script>
<script type="text/javascript">
var NoteEditor;
$(function() {
NoteEditor = editormd("NoteEditor", {
width: "100%",
height: 350,
path : "/static/editor.md/lib/",
markdown : "[TOC]\n\n",
toolbarIcons : function() {
return [
"undo", "redo", "|",
"bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|",
"h1", "h2", "h3", "h4", "h5", "h6", "|",
"list-ul", "list-ol", "hr", "|",
"link", "reference-link", "image", "code", "table", "datetime",
"|"
]
},
// codeFold : true,
saveHTMLToTextarea : true, // 保存 HTML 到 Textarea
searchReplace : true,
htmlDecode : "style,script,iframe|on*", // 开启 HTML 标签解析,为了安全性,默认不开启
emoji : true,
taskList : true,
tocm : true, // Using [TOCM]
tex : true, // 开启科学公式TeX语言支持,默认关闭
flowChart : true, // 开启流程图支持,默认关闭
sequenceDiagram : true, // 开启时序/序列图支持,默认关闭,
imageUpload : true,
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
// imageUploadURL : "./php/upload.php",
onload : function() {
// console.log('onload', this);
}
});
// $("#goto-line-btn").bind("click", function(){
// testEditor.gotoLine(90);
// });
//
// $("#show-btn").bind('click', function(){
// testEditor.show();
// });
//
// $("#hide-btn").bind('click', function(){
// testEditor.hide();
// });
//
// $("#get-md-btn").bind('click', function(){
// alert(testEditor.getMarkdown());
// });
//
// $("#get-html-btn").bind('click', function() {
// alert(testEditor.getHTML());
// });
//
// $("#watch-btn").bind('click', function() {
// testEditor.watch();
// });
//
// $("#unwatch-btn").bind('click', function() {
// testEditor.unwatch();
// });
//
// $("#preview-btn").bind('click', function() {
// testEditor.previewing();
// });
//
// $("#fullscreen-btn").bind('click', function() {
// testEditor.fullscreen();
// });
//
// $("#show-toolbar-btn").bind('click', function() {
// testEditor.showToolbar();
// });
//
// $("#close-toolbar-btn").bind('click', function() {
// testEditor.hideToolbar();
// });
//
// $("#toc-menu-btn").click(function(){
// testEditor.config({
// tocDropdown : true,
// tocTitle : "目录 Table of Contents",
// });
// });
//
// $("#toc-default-btn").click(function() {
// testEditor.config("tocDropdown", false);
// });
});
</script>
</body>
</html>