-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
120 lines (119 loc) · 4.52 KB
/
index.html
File metadata and controls
120 lines (119 loc) · 4.52 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
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css"
rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
<title>Text Editor GUI</title>
</head>
<body>
<div class="container">
<div class="toolbar">
<div class="head">
<input
type="text"
placeholder="Filename"
value="untitled"
id="filename" />
<select onchange="fileHandle(this.value); this.selectedIndex=0">
<option value="" selected="" hidden="" disabled="">File</option>
<option value="new">New file</option>
<option value="txt">Save as txt</option>
<option value="pdf">Save as pdf</option>
</select>
<select
onchange="formatDoc('formatBlock', this.value); this.selectedIndex=0;">
<option value="" selected="" hidden="" disabled="">Format</option>
<option value="h1">Heading 1</option>
<option value="h2">Heading 2</option>
<option value="h3">Heading 3</option>
<option value="h4">Heading 4</option>
<option value="h5">Heading 5</option>
<option value="h6">Heading 6</option>
<option value="p">Paragraph</option>
</select>
<select
onchange="formatDoc('fontSize', this.value); this.selectedIndex=0;">
<option value="" selected="" hidden="" disabled="">
Font size
</option>
<option value="1">Extra small</option>
<option value="2">Small</option>
<option value="3">Regular</option>
<option value="4">Medium</option>
<option value="5">Large</option>
<option value="6">Extra Large</option>
<option value="7">Big</option>
</select>
<div class="color">
<span>Color</span>
<input
type="color"
oninput="formatDoc('foreColor', this.value); this.value='#000000';" />
</div>
<div class="color">
<span>Background</span>
<input
type="color"
oninput="formatDoc('hiliteColor', this.value); this.value='#000000';" />
</div>
</div>
<div class="btn-toolbar">
<button onclick="formatDoc('undo')">
<i class="bx bx-undo"></i>
</button>
<button onclick="formatDoc('redo')">
<i class="bx bx-redo"></i>
</button>
<button onclick="formatDoc('bold')">
<i class="bx bx-bold"></i>
</button>
<button onclick="formatDoc('underline')">
<i class="bx bx-underline"></i>
</button>
<button onclick="formatDoc('italic')">
<i class="bx bx-italic"></i>
</button>
<button onclick="formatDoc('strikeThrough')">
<i class="bx bx-strikethrough"></i>
</button>
<button onclick="formatDoc('justifyLeft')">
<i class="bx bx-align-left"></i>
</button>
<button onclick="formatDoc('justifyCenter')">
<i class="bx bx-align-middle"></i>
</button>
<button onclick="formatDoc('justifyRight')">
<i class="bx bx-align-right"></i>
</button>
<button onclick="formatDoc('justifyFull')">
<i class="bx bx-align-justify"></i>
</button>
<button onclick="formatDoc('insertOrderedList')">
<i class="bx bx-list-ol"></i>
</button>
<button onclick="formatDoc('insertUnorderedList')">
<i class="bx bx-list-ul"></i>
</button>
<button onclick="addLink()"><i class="bx bx-link"></i></button>
<button onclick="formatDoc('unlink')">
<i class="bx bx-unlink"></i>
</button>
<button id="show-code" data-active="false"></></button>
</div>
</div>
<div id="content" contenteditable="true" spellcheck="false">
Enter Something...
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"
integrity="sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script src="app.js"></script>
</body>
</html>