[annotator-dev] Port of Factlink's paragraph icons to Annotator.js
tilgovi at hypothes.is
Mon May 4 21:27:31 UTC 2015
On Sun, May 3, 2015 at 10:36 PM, Jan Paul Posma <janpaul at factlink.com>
> For those of you who are interested in icons next to paragraphs that
> automatically integrate with a host website (paragraph detection,
> colour/size adjustment, style/script isolation, etc), I ported our
> code from Factlink to Annotator.js.
Aside from getting jQuery from annotator.util, does this use Annotator at
all or implement its extension module pattern?
> Code: https://github.com/Factlink/annotator-paragraph-icons
> Demo: http://factlink.github.io/annotator-paragraph-icons/
> Main advantages are that this interface is easier to discover, could
> be made to work well on mobile (show icon when touching a paragraph),
> and could be used to group annotations instead of highlights or a more
> complicated sidebar as Hypothes.is has (though this grouping is
> currently not implemented).
> Only thing missing is the actual saving of the annotation, that seemed
> a bit tricky for me to figure out, and not really documented. If
> someone from the Annotator team could fill this in, that would be
The `start` hook receives the `App` as an argument.
It's probably reasonable to expect that instance to have a property,
`annotations` conforming to the Storage interface. The details of this are
not 100% settled and the robustness of using the application instance to
get these properties is not known yet, until we see more applications built.
The absolute best thing you can do to start with is to make sure your code
has a public interface. One should be able to instantiate it, likely given
a root element under which to act, and it should provide some way for the
user to be notified about events that your code handles, for instance by
providing an `onClick` option to the constructor.
>From there, wrapping it as an Annotator module and including it in an
application should be straightforward. However, crucially, the core of what
you've done becomes independent of Annotator or any other annotation
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the annotator-dev