[annotator-dev] linking to annotations within annotated document

Shauna Gordon-McKeon shaunagm at gmail.com
Wed Feb 25 22:15:51 UTC 2015


Hi all,

I've been working with the Annotator for the last few days and have
successfully got it working with my app (using Django & Django Rest
Framework api).  I'd like to be able to link users to annotations.  I'm not
talking about as a lone object, as for instance
annotatorjs.org/annotateit.org do, but embedded in the document which it's
annotating.

My first guess at how to do this would be to attach the annotation's unique
ID as the highlighted span's ID so it can be used as an anchor on the
document.  Some nosing around suggests that highlightRange
<https://github.com/openannotation/annotator/blob/0041995f944e7f1f1373b03e20565bb69e226b52/src/ui/highlighter.js#L18>
is where that span is created.  Is there a way to get this behavior via a
plugin, or should I modify highlightRange directly?  It seems that in order
to modify highlightRange, I'd need to pass in the annotation ID but I
can't, from searching the git repo and reading the docs, tell where
highlightRange is even being called.

Do folks have any suggestions?  I'm new to JQuery and pretty inexperienced
with Javascript generally, so my apologies if these are questions with
obvious answers.

- Shauna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150225/66235d2c/attachment-0003.html>


More information about the annotator-dev mailing list