Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (69 sloc) 3.221 kb
fbfaa1e @aron Annotator can now de serialise annotation in XML documents. Fixes #54
aron authored
1 <?xml version="1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <title>JS annotation test</title>
7
8 <script src="lib/vendor/jquery.js"></script>
9 <script src="lib/vendor/json2.js"></script>
10
11 <script src="lib/extensions.js"></script>
12 <script src="lib/console.js"></script>
13 <script src="lib/class.js"></script>
14 <script src="lib/range.js"></script>
15 <script src="lib/annotator.js"></script>
16 <script src="lib/widget.js"></script>
17 <script src="lib/editor.js"></script>
18 <script src="lib/viewer.js"></script>
19 <script src="lib/notification.js"></script>
20 <script src="lib/plugin/store.js"></script>
21 <script src="lib/plugin/permissions.js"></script>
22 <script src="lib/plugin/auth.js"></script>
23 <script src="lib/plugin/tags.js"></script>
24 <script src="lib/plugin/unsupported.js"></script>
25 <script src="lib/plugin/filter.js"></script>
26
27 <link rel="stylesheet" type="text/css" href="css/annotator.css" />
28 </head>
29
30 <body>
31 <header>
32 <h1>Javascript annotation service test</h1>
33 </header>
34
35 <div id="airlock">
36 <p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
37
38 <h2>Header Level 2</h2>
39
40 <ol>
41 <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
42 <li>Aliquam tincidunt mauris eu risus.</li>
43 </ol>
44
45 <blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p></blockquote>
46
47 <h3>Header Level 3</h3>
48
49 <ul>
50 <li id="listone">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
51 <li id="listtwo">Aliquam tincidunt mauris eu risus.</li>
52 </ul>
53
54 <pre><code>
55 #header h1 a {
56 display: block;
57 width: 300px;
58 height: 80px;
59 }
60 </code></pre>
61 </div>
62
63 <script>
64 var devAnnotator
65 (function ($) {
66 var elem = document.getElementById('airlock');
67 devAnnotator = new Annotator(elem);
68 devAnnotator.setupAnnotation({
69 "ranges":[{
70 "start":"/blockquote/p",
71 "startOffset":28,
72 "end":"/blockquote/p",
73 "endOffset":55
74 }],
75 "text": "My Quote",
76 "quote":"consectetur adipiscing elit"
77 });
78 }(jQuery));
79 </script>
80 </body>
81 </html>
Something went wrong with that request. Please try again.