-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (96 loc) · 4.11 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
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS Text Editor</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="siteMode">
<h1>Online Text Editor</h1>
<button id="dark" class="theme-button" onclick="dark();">
<i class="fa-solid fa-moon"></i>
</button>
<button id="light" class="theme-button" onclick="light();">
<i class="fa-solid fa-sun"></i>
</button>
</div>
<div class="options">
<button id="undo" class="option-button">
<i class="fa-solid fa-undo"></i>
</button>
<button id="redo" class="option-button">
<i class="fa-solid fa-redo"></i>
</button>
<button id="bold" class="option-button format">
<i class="fa-solid fa-bold"></i>
</button>
<button id="italic" class="option-button format">
<i class="fa-solid fa-italic"></i>
</button>
<button id="underline" class="option-button format">
<i class="fa-solid fa-underline"></i>
</button>
<button id="superscript" class="option-button script">
<i class="fa-solid fa-superscript"></i>
</button>
<button id="subscript" class="option-button script">
<i class="fa-solid fa-subscript"></i>
</button>
<button id="insertOrderedList" class="option-button">
<i class="fa-solid fa-list-ol"></i>
</button>
<button id="insertUnorderedList" class="option-button">
<i class="fa-solid fa-list-ul"></i>
</button>
<button id="justifyLeft" class="option-button align">
<i class="fa-solid fa-align-left"></i>
</button>
<button id="justifyCenter" class="option-button align">
<i class="fa-solid fa-align-center"></i>
</button>
<button id="justifyRight" class="option-button align">
<i class="fa-solid fa-align-right"></i>
</button>
<button id="justifyFull" class="option-button spacing">
<i class="fa-solid fa-align-justify"></i>
</button>
<button id="indent" class="option-button spacing">
<i class="fa-solid fa-indent"></i>
</button>
<button id="outdent" class="option-button spacing">
<i class="fa-solid fa-outdent"></i>
</button>
<button id="createLink" class="adv-option-button">
<i class="fa-solid fa-link"></i>
</button>
<button id="unlink" class="option-button">
<i class="fa-solid fa-unlink"></i>
</button>
<select id="formatBlock" class="adv-option-button">
<option value="H1">H1</option>
<option value="H2">H2</option>
<option value="H3">H3</option>
<option value="H4">H4</option>
<option value="H5">H5</option>
<option value="H6">H6</option>
</select>
<select id="fontName" class="adv-option-button"></select>
<select id="fontSize" class="adv-option-button"></select>
<div class="input-wrapper">
<input type="color" id="foreColor" class="adv-option-button">
<label for="foreColor">Font Color</label>
</div>
<div class="input-wrapper">
<input type="color" id="backColor" class="adv-option-button">
<label for="backColor">Highlight Color</label>
</div>
</div>
<div id="text-input" contenteditable="true"></div>
</div>
<script src="main.js"></script>
</body>
</html>