-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (97 loc) · 4.54 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hey Markdown! Editor</title>
<link href="styles.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/iconfont/material-icons.min.css">
<link rel="icon" href="img/favicon.ico">
</head>
<body>
<div class="container">
<div class="toolbar">
<button onclick="insertText('**', '**')" title="Bold (Ctrl+B)">
<i class="fas fa-bold"></i> Bold
</button>
<button onclick="insertText('*', '*')" title="Italic (Ctrl+I)">
<i class="fas fa-italic"></i> Italic
</button>
<button onclick="insertText('~~', '~~')" title="Strikethrough">
<i class="fas fa-strikethrough"></i> Strike
</button>
<button onclick="insertHeading()" title="Add heading">
<i class="fas fa-heading"></i> Heading
</button>
<button onclick="insertQuote()" title="Add quote">
<i class="fas fa-quote-right"></i> Quote
</button>
<button onclick="insertList('unordered')" title="Bullet list">
<i class="fas fa-list-ul"></i> List
</button>
<button onclick="insertList('ordered')" title="Numbered list">
<i class="fas fa-list-ol"></i> Numbered
</button>
<button onclick="insertBoxed()" title="Add boxed text">
<i class="fas fa-box"></i> Boxed
</button>
<button onclick="insertLink()" title="Add link (Ctrl+K)">
<i class="fas fa-link"></i> Link
</button>
<button onclick="insertImage()" title="Add image">
<i class="fas fa-image"></i> Image
</button>
<button onclick="insertCode()" title="Add code block">
<i class="fas fa-code"></i> Code
</button>
<button onclick="insertTable()" title="Add table">
<i class="fas fa-table"></i> Table
</button>
<button onclick="insertSup()" title="Add exponential number">
<i class="fas fa-1"></i> Sup
</button>
<button onclick="insertHorizontalRule()" title="Add horizontal line">
<i class="fas fa-minus"></i> Line
</button>
<button onclick="insertEmbedVideo('')" title="Add embed YouTube video">
<i class="fas fa-play"></i> Embed Video
</button>
<button onclick="insertFontAwesome('')" title="Add FontAwesome emoji">
<i class="fas fa-icons"></i> FontAwesome
</button>
<button onclick="insertMaterialIcon('')" title="Add Material icon">
<i class="fas fa-icons"></i> Material Icons
</button>
<button onclick="downloadMd()" title="Download as .MD">
<i class="fas fa-download"></i> .MD
</button>
<button onclick="downloadHtml()" title="Download as .HTML">
<i class="fas fa-download"></i> .HTML
</button>
<button onclick="clearEditor()" title="Clear editor">
<i class="fas fa-trash"></i>
</button>
<button onclick="toggleFullScreen()" title="Toggle fullscreen">
<i class="fas fa-expand"></i>
</button>
<button id="githubButton" title="View on GitHub">
<i class="fab fa-github"></i>
</button>
</div>
<div class="editor-container">
<div class="editor-section">
<textarea id="editor"></textarea>
</div>
<div class="preview-section">
<div id="preview"></div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/markdown/markdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.3.0/marked.min.js"></script>
<script src="main.js"></script>
</body>
</html>