[annotator-dev] Issue with Update Annotator
Suchitra Subramanian
suchitra at mozaikmedia.com
Tue Mar 12 06:01:07 UTC 2013
Hello - Does the update functionality of annotator work only if i specify *
$("body").annotator()*?
I have the following simple html page:
*<!DOCTYPE html>*
*
*
*<html lang="en" xmlns="http://www.w3.org/1999/xhtml">*
*<head>*
* <title>Some Title</title>*
* <meta charset="utf-8" />*
* <script src="jquery-1.7.1.min.js" type="text/javascript"></script>*
*
*
* <script src="annotator-full.min.js" type="text/javascript"></script>*
*
*
* <link href="annotator.min.css" rel="stylesheet" type="text/css" />*
*
*
* <script type="text/javascript">*
*
*
* jQuery(document).ready(function ($) {*
* $('#dvText').annotator();*
* //$('body').annotator();*
* });*
*
*
* </script>*
*</head>*
*<body>*
* <form id="form1" runat="server">*
* <div id="dvText">*
* lot of text here<br />*
* test and further<br />*
* testing*
* annotations*
*
*
* <h2>The Annotator Demo</h2>*
* <p>Annotator is a Javascript shim that you can insert into any
page, allowing*
* you to select and annotate text, images, or (almost) anything
else.</p>*
*
*
* <p><strong>How do I use it?</strong> We think you'll get the hang
of it*
* pretty quickly. It's running right now on this page try it out*
* by selecting some text and clicking on the note icon. Enter a
note and*
* press you should see your annotation*
* as a highlighted piece of text. Hover over the highlight with
your mouse*
* to view, edit and delete the annotation.</p>*
*
*
* <p><strong>What happens to my annotations?</strong> The
annotations on*
* this page are being sent to*
* </div>*
* </form>*
*</body>*
*</html>*
*
*
When I run this page, i can create a new annotation on a piece of selected
text.*
*
However, when i try to update an existing annotation, by clicking on the
"pencil" icon, the page gets reloaded and the textarea that lets one edit
the annotation itself does not appear.
FYI, I can successfully delete an existing annotation.
The interesting part is:
if I replace *$('#dvText').annotator();* with *$('body').annotator();* I am
able to update the annotations.
I am using 1.2.6 version of the annotator.
Is this behavior by design?
Am i missing something basic?
Please clarify.
Thanks
Suchitra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20130312/f6ab8e56/attachment-0001.html>
More information about the annotator-dev
mailing list