-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (77 loc) · 4.03 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/0cb336bc27.js" crossorigin="anonymous"></script>
<title>Editor Text</title>
</head>
<body onload=" enabledEdit()" >
<div id="buttons">
<button onclick="exCmd('bold')"> <i class="fa fa-bold"></i> </button>
<button onclick="exCmd('italic')"> <i class="fa fa-italic"></i> </button>
<button onclick="exCmd('underline')"> <i class="fa fa-underline"></i> </button>
<button onclick="exCmd('strikethrough')"> <i class="fa fa-strikethrough"></i> </button>
<button onclick="exCmd('justifyLeft')"> <i class="fa fa-align-left"></i> </button>
<button onclick="exCmd('justifycenter')"> <i class="fa fa-align-center"></i> </button>
<button onclick="exCmd('justifyRight')"> <i class="fa fa-align-right"></i> </button>
<button onclick="exCmd('justifyFull')"> <i class="fa fa-align-justify"></i> </button>
<button onclick="exCmd('cut')"> <i class="fa fa-cut"></i> </button>
<button onclick="exCmd('copy')"> <i class="fa fa-copy"></i> </button>
<button onclick="exCmd('indent')"> <i class="fa fa-indent"></i> </button>
<button onclick="exCmd('outdent')"> <i class="fa fa-dedent"></i> </button>
<button onclick="exCmd('subscript')"> <i class="fa fa-subscript"></i> </button>
<button onclick="exCmd('superscript')"> <i class="fa fa-superscript"></i> </button>
<button onclick="exCmd('undo')"> <i class="fa fa-undo"></i> </button>
<button onclick="exCmd('redo')"> <i class="fa fa-repeat"></i> </button>
<button onclick="exCmd('insertUnorderedList')"> <i class="fa fa-list-ul"></i> </button>
<button onclick="exCmd('insertOrderedList')"> <i class="fa fa-list-ol"></i> </button>
<button onclick="exCmd('insertParagraph')"> <i class="fa fa-paragraph"></i> </button>
<select onchange="exCmdWArg('formatBlock', this.value)">
<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>
<button onclick="exCmd('insertHorizontalRule')">HR</button>
<button onclick="exCmdWArg('createLink', prompt('Enter a URL', 'http://'))"> <i class="fa fa-link"></i> </button>
<button onclick="exCmd('unlink')"> <i class="fa fa-unlink"></i> </button>
<button onclick="toggleSource()"> <i class="fa fa-code"></i> </button>
<button onclick="toggleEdit()"> Toggle Edit </button>
<!-- FONT -->
<select onchange="exCmdWArg('fontName', this.value)">
<option value="Arial" >Arial </option>
<option value="Comics Sans MS" >Comics Sans MS </option>
<option value="Courier">Courier </option>
<option value="Georgia" >Georgia </option>
<option value="Tahomo" >Tahomo </option>
<option value="Times New Roman" >Times New Roman </option>
<option value="Verdana" >Verdana </option>
</select>
<!-- FONT SIZE -->
<select onchange="exCmdWArg('fontSize', this.value)">
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
<option value="6"> 6 </option>
<option value="7"> 7 </option>
</select>
<br>
<!-- COLORS -->
Fore Color: <input type="color" onchange="exCmdWArg('foreColor', this.value)" />
Background: <input type="color" onchange="exCmdWArg('hiliteColor', this.value)" />
<!-- --- -->
<button onclick="exCmdWArg('insertImage', prompt('Enter the img URL', ''))"> <i class="fa fa-file-image-o"></i> </button>
<button onclick="exCmd('selectAll')"> Select All</button>
</div>
<iframe name="richTextFiled" style="width: 1000px; height:500px;"></iframe>
<!-- javascript -->
<script type="text/javascript" src="./index.js">
</script>
</body>
</html>