-
Notifications
You must be signed in to change notification settings - Fork 10
/
rich-text-editor.test.d.html
27 lines (25 loc) · 1.02 KB
/
rich-text-editor.test.d.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
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Demo</title>
<link href="rich-text-editor.css" rel="stylesheet">
</head>
<body>
<p><textarea>Lorem ipsum dolor sit amet.</textarea></p>
<p>
<button onclick="editor.d.v();editor.dialog.children[0].focus();">Show Dialog</button>
<button onclick="editor.d.x();">Hide Dialog</button>
<button onclick="editor.d.v(true);editor.dialog.children[0].focus();">Show Dialog & Save Selection</button>
<button onclick="editor.d.x(true);">Hide Dialog & Restore Selection</button>
</p>
<p>
<button onclick="editor.d('$placeholder', '$value', function(e, input){ alert(input.value); });">Show Dialog with Pre–Defined Placeholder, Value and Callback Function</button>
</p>
<script src="rich-text-editor.js"></script>
<script>
var editor = new RTE(document.querySelector('textarea'));
</script>
</body>
</html>