forked from MrRio/DOCX.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
50 lines (41 loc) · 1.06 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>docxJS</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
padding: 30px;
font-family: Arial, Helvetica;
}
h1, h2, h3, h4 {
margin-bottom: 0.7em;
}
p {
margin-bottom: 1em;
}
</style>
<!-- Include dependencies -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="./libs/base64.js"></script>
<script type="text/javascript" src="./libs/jszip/jszip.js"></script>
<!-- Include main js lib -->
<script type="text/javascript" src="DOCX.js"></script>
</head>
<body>
<h1>DOCX.js Test Page</h1>
<p>This is the DOCX.js test page.</p>
<script>
function test() {
var doc = new DOCXjs();
doc.text('DOCX.js is a free open source library for generating Microsoft Word Documents using pure client-side JavaScript.');
doc.text('It was developed by James Hall at Snapshot Media.');
var output = doc.output('datauri');
}
</script>
<p><a href="javascript:test()">Run Test</a></p>
</body>
</html>