Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

98 lines (74 sloc) 3.95 KB
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>JS annotation test</title>
<!-- jQuery must be included before Annotator -->
<script src="lib/vendor/jquery.js"></script>
<!-- If you're sure your users will only be using browsers modern
enough to have their own JSON.parse and JSON.stringify
implementations you can skip this -->
<script src="lib/vendor/json2.js"></script>
<!-- The main Annotator script -->
<script src="pkg/annotator/annotator.min.js"></script>
<!-- Annotator's styling and images -->
<link rel="stylesheet" type="text/css" href="pkg/annotator/annotator.min.css">
<!-- The following plugins are entirely optional -->
<!-- The Store plugin. Saves annotations to a remote backend -->
<script src="pkg/annotator/"></script>
<!-- The Auth plugin. Allows users of Annotator to authenticate themselves
to the remote backend -->
<script src="pkg/annotator/annotator.auth.min.js"></script>
<!-- The Permissions plugin. See who created which annotation and create
annotations as a specified user -->
<script src="pkg/annotator/annotator.permissions.min.js"></script>
<!-- The Tags plugin. Edit and display tag keywords on annotations -->
<script src="pkg/annotator/annotator.tags.min.js"></script>
<!-- The Markdown plugin. Treat annotation text as Markdown -->
<script src="lib/vendor/showdown.js"></script>
<script src="pkg/annotator/annotator.markdown.min.js"></script>
<h1>Javascript annotation service test</h1>
<div id="airlock">
<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>
<h2>Header Level 2</h2>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Aliquam tincidunt mauris eu risus.</li>
<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>
<h3>Header Level 3</h3>
<li id="listone">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li id="listtwo">Aliquam tincidunt mauris eu risus.</li>
#header h1 a {
display: block;
width: 300px;
height: 80px;
jQuery(function ($) {
if (typeof $.fn.annotator !== 'function') {
alert("Ooops! it looks like you haven't built the Annotator concatenation file. " +
"Either download a tagged release from GitHub, or modify the Cakefile to point " +
"at your copy of the YUI compressor and run `cake package`.");
} else {
// This is the important bit: how to create the annotator and add
// plugins
.annotator('addPlugin', 'Permissions')
.annotator('addPlugin', 'Markdown')
.annotator('addPlugin', 'Tags');
$('#airlock').data('annotator').plugins['Permissions'].setUser("Joe Bloggs");
Jump to Line
Something went wrong with that request. Please try again.