This is beyond the scope of what plugins were designed for, since they
mostly just do work in response to events.

However, it's possible.

First, get a handle to your annotator instance directly.

var annotator = $('#content').annotator();

This object has all the methods you see the jQuery plugin providing,
without having to call ".annotator()" every time. For instance, you can do
"annotator.addPlugin(...)".

Next, you can access the store plugin itself as " annotator.plugins.Store".
On May 11, 2015 07:44, "Mathias Lin" <[email protected]> wrote:

> Hello,
>
> How can I call the loadFromSearch or loadAnnotations function of the Store
> plugin (http://docs.annotatorjs.org/en/v1.2.x/plugins/store.html)
> manually, not only automated when the plugin is added for the first time?
>
> Currently it¹s being executed when the plugin is added:
>
> $('#content').annotator('addPlugin', 'Store', {
>   loadFromSearch: {
>     'limit': 0,
>     'all_fields': 1,
>     'uri': 'http://this/document/only'
>   }
> });
>
>
> but I need to call it multiple times later on.
>
>
> How to get a reference to the Store-Plugin in order to call its functions?
>
> Thanks,
> Mathias
>
>
> btw:
>
> @Randall:
> I noted you are writing an app to integrated Annotator into pdf.js.
> https://lists.okfn.org/pipermail/annotator-dev/2015-May/001423.html
> I am actually working on exactly the same right now. Would be interesting
> to know about your experience and progress.
> My question above is actually related to that project.
>
> _______________________________________________
> annotator-dev mailing list
> [email protected]
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>
_______________________________________________
annotator-dev mailing list
[email protected]
https://lists.okfn.org/mailman/listinfo/annotator-dev
Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev

Reply via email to