forked from guardian/scribe
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cjs.html
66 lines (52 loc) · 1.39 KB
/
cjs.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
<!--
This example demonstrates how to consume the Scribe
editor using `browserify` and CommonJS module syntax.
Note that you'll need to install scribe's dependencies
through `npm install`. `npm` is installed with Node.js.
See http://nodejs.org/ if you are unfamiliar.
In order to compile the `build.js` file, run the following file: build-cjs.sh.
See the `examples/cjs.js` file to see the JavaScript logic for this example.
-->
<!DOCTYPE html>
<html>
<head>
<title>Scribe editor example page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
button {
height: 3em;
}
.active {
border-style: inset;
}
#editor, .toolbar {
display: block;
}
p {
margin-top: 0;
}
#editor {
border: 1px solid gray;
height: 300px;
overflow: auto;
}
.editor-output {
width: 100%;
height: 10em;
}
</style>
</head>
<body>
<div class="toolbar">
<button data-command-name="bold">Bold</button>
<button data-command-name="italic">Italic</button>
<button data-command-name="underline">Underline</button>
</div>
<div id="editor" contenteditable="true"></div>
<div>
<h1>Output</h1>
<textarea class="editor-output" readonly></textarea>
</div>
<script src="build.js"></script>
</body>
</html>