-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
45 lines (34 loc) · 1.26 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Example Document</title>
<link rel="stylesheet" href="app.css" type="text/css"/>
<script src="lib/live.js"></script>
<script src="src/Editing/EventHandlers.js"></script>
<script src="src/Undo.js"></script>
<script src="src/DocumentOwner.js"></script>
<script src="src/TreeNavigator.js"></script>
<script src="src/Block.js"></script>
<script src="src/TextBlock.js"></script>
<script src="src/TextSpan.js"></script>
<script src="src/DocumentCursor.js"></script>
<script src="src/Editing/KeyboardShortcutManager.js"></script>
<script src="src/Editing/InputProcessor.js"></script>
<script src="src/Editing/Actions.js"></script>
<script src="src/Editing/DocumentEditor.js"></script>
<script>
window.onload = function() {
var contentElement = document.getElementById('document');
var originalText = contentElement.textContent;
var editor = new TextRight.ContentEditor.DocumentEditor();
editor.owner.attachTo(contentElement);
editor.owner.root.children[0].spans[0].insertText(0, originalText);
document.querySelector("input").focus();
};
</script>
</head>
<body>
<div id="document">This is some of the documentation</div>
</body>
</html>