-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxedit.html
44 lines (43 loc) · 1.78 KB
/
xedit.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
<html>
<head>
<script src="xedit.js.min"></script>
<style>
h1 { font-family: Optima, sans-serif; font-style: italic; text-align: right; background-color: #45597f; margin: 0; padding: 20px 50px 20px 20px; color:#b7bdd5; }
html { background-color: #b7bdd5; margin: 0; padding: 0; }
body { margin: 0; }
.main { background-color: #fff; margin-left: 10%; margin-right: 10px; margin-top: 30px; padding: 20px; font-family: sans-serif; }
.editwrapper { background-color: #6d8cc7; padding: 10px; color: #fff; }
#edit { padding: 10px; }
pre { background-color: #ddd; margin-left: 20px; border: 1px dotted black min-height: 120px; }
</style>
</head>
<body onload="startXEdit('dummy-config.xml'); loadDoc('dummy.xml')">
<h1> XEdit </h1>
<div class="wrapper">
<div class="main">
<p> <b>XEdit is a generic XML editor written in Javascript.</b> </p>
<p> Most WYSIWYG rich text editors support HTML or XHTML; XEdit
is written for the case where you want to use a web interface
to author documents in DocBook, DITA or any other XML schema.
</p>
<p> Here's an example of XEdit working on a document with a
pseudo-DocBook XML format:
</p>
<div class="editwrapper">
<div id="edit" contenteditable="true" style="border:1px solid black">
</div>
</div>
<script>function writeToPre() {
var pre = document.getElementById("output");
pre.innerHTML = "";
var cdata = document.createTextNode(document.getElementById("edit").innerHTML);
pre.appendChild(cdata);
}
</script>
<p> Click on the "Save" icon to write the XML output here:</p>
<pre id="output">
</pre>
</div>
</div>
</body>
</html>