[annotator-dev] How to use AnnotateIt.org with Store plugin

Kunal Kadakia kadakiakunal at gmail.com
Mon Mar 5 18:07:58 UTC 2012


Hi dev-team,

a) I downloaded "annotator-full.1.1.0.zip" from:
https://github.com/okfn/annotator/downloads/

and installed it without any issues.

b) I was able create a simple HTML file and instantiate the annotator
as follows:

jQuery(function ($) {
  var content = $('#content').annotator();
});

c) Now, I want to store my annotations at http://annotateit.org. So, I
created an account at http://annotateit.org. I read the Wiki on Store
and Authentication, but I was not able to figure on how I should store
my annotations in my annotateit.org account.

I am using the Store plugin as follows, but I don't know where I
should specify my credentials.

jQuery(function ($) {
  var content = $('#content').annotator();
  content.annotator('addPlugin', 'Store', {
    prefix: 'http://annotateit.org'
});
});

e) So, then later I realized that I need to use the Authentication
plugin. I was not able to figure it out where to specify the
credentials. I came across this snippet:

var content = $('#content'));
content.annotator('addPlugin', 'Auth', {
 tokenUrl: '/auth/token'
});

It would be good if someone could supply a working code snippet on how
to store annotations in my annotateit.org account. It would highly be
appreciated, as I have spent significant time in finding it.

Thanks,
Kunal




More information about the annotator-dev mailing list