-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (70 loc) · 6.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WYSIWYG</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" href="node_modules/tribute/tribute.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="ed-container">
<div style="margin: 0 auto;">
<h3>WYSIWYG Editor</h3>
<div id="wysiwygEditor">
<div id="commandHolder">
<button class="btn btn-default" data-toggle="tooltip" title="Bold" data-command="bold" id="text-bold" onclick="executeEditorCommand(this)"><i class="fa fa-bold" aria-hidden="true"></i></button>
<button class="btn btn-default" data-toggle="tooltip" title="Italic" data-command="italic" id="text-italic" onclick="executeEditorCommand(this)"><i class="fa fa-italic" aria-hidden="true"></i></button>
<button class="btn btn-default" data-toggle="tooltip" title="Underline" data-command="underline" id="text-underline" onclick="executeEditorCommand(this)"><i class="fa fa-underline" aria-hidden="true"></i></button>
<div class="dropdown" data-toggle="tooltip" title="Font family">
<button class="btn btn-default dropdown-toggle" id="fontList" style="height: 100%;" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa fa-font" aria-hidden="true"></i><span class="caret"></span></button>
<ul class="dropdown-menu" aria-labelledby="fontList" style="height: 250px; overflow: auto;">
</ul>
</div>
<div class="vl"></div>
<button class="btn btn-default" data-toggle="tooltip" title="Unordered list" data-command="insertUnorderedList" id="text-unorderedList" onclick="executeEditorCommand(this)"><i class="fa fa-list-ul" aria-hidden="true"></i></button>
<button class="btn btn-default" data-toggle="tooltip" title="Ordered List" data-command="insertOrderedList" id="text-OrderedList" onclick="executeEditorCommand(this)"><i class="fa fa-list-ol" aria-hidden="true"></i></button>
<div class="dropdown" data-toggle="tooltip" title="Align">
<button class="btn btn-default dropdown-toggle" id="alignment" style="height: 100%;" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa fa-align-justify" aria-hidden="true"></i><span class="caret"></span></button>
<ul class="dropdown-menu" aria-labelledby="alignment">
<button type="button" onclick="executeEditorCommand(this)" data-toggle="tooltip" title="Align left" data-command="justifyLeft" class="list-group-item"><i class="fa fa-align-left" aria-hidden="true"></i></button>
<button type="button" onclick="executeEditorCommand(this)" data-toggle="tooltip" title="Align right" data-command="justifyRight" class="list-group-item"><i class="fa fa-align-right" aria-hidden="true"></i></button>
<button type="button" onclick="executeEditorCommand(this)" data-toggle="tooltip" title="Align center" data-command="justifyCenter" class="list-group-item"><i class="fa fa-align-center" aria-hidden="true"></i></button>
<button type="button" onclick="executeEditorCommand(this)" data-toggle="tooltip" title="Align justify" data-command="justifyFull" class="list-group-item"><i class="fa fa-align-justify" aria-hidden="true"></i></button>
</ul>
</div>
<div class="vl"></div>
<button class="btn btn-default" data-toggle="tooltip" title="Undo" data-command="undo" id="text-undo" onclick="executeEditorCommand(this)"><i class="fa fa-undo" aria-hidden="true"></i></button>
<button class="btn btn-default" data-toggle="tooltip" title="Redo" data-command="redo" id="text-redo" onclick="executeEditorCommand(this)"><i class="fa fa-repeat" aria-hidden="true"></i></button>
<div class="vl"></div>
<div class="dropdown" data-toggle="tooltip" title="Insert link">
<button class="btn btn-default dropdown-toggle" style="height: 100%;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="add-link" ><i class="fa fa-link" aria-hidden="true"></i></button>
<ul class="dropdown-menu" aria-labelledby="add-link">
<li>
<div class="form-group paddinglr-5px">
<label for="usr">Enter Url:</label>
<input type="text" class="form-control" id="link" style="border-radius: 0" autocomplete="false">
<button class="btn btn-link float-r" id="inserLinkBtn">Insert</button>
</div>
</li>
</ul>
</div>
<button class="btn btn-default" data-toggle="tooltip" title="Remove link" data-command="unlink" id="remove-link" onclick="executeEditorCommand(this)"><i class="fa fa-chain-broken" aria-hidden="true"></i></button>
<div class="vl"></div>
</div>
<div contenteditable="true" class="form-control" id="emailContent" onkeydown="onContentKeydown(event)" onkeyup="onContentKeyup(event)"></div>
</div>
<p style="opacity: 0.5"><em>Type '@' to show list of variables</em></p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script src="node_modules/tribute/tribute.js"></script>
<script src="script.js"></script>
</body>
</html>