[annotator-dev] Annotator Offline Plugin - How to annotate more than one page

Aron Carroll aron at hypothes.is
Thu Jan 8 15:22:45 UTC 2015


Great, glad to hear that works. To change the highlight color you just need to set a background color for `.annotator-hl` elements. Include this in a stylesheet loaded after the annotator.css.

    .annotator-hl { background-color: red; }

Cheers,
Aron
 
> On 8 Jan 2015, at 14:59, Alexander Wülfing <alexander.wuelfing at gmail.com> wrote:
> 
> Hi Aron,
> 
> thank works good if i set the url via ann.url in the setAnnotationFunction :-)
> 
> My current solution which I found before your suggestion was
> 
>     setAnnotationData: function (ann) {
>     // Add page specific data to the annotation on creation.
>     if (!ann.page) {
>       ann.page = 8888; 
>     }
>   },
>   shouldLoadAnnotation: function (ann) {
>     // Return true if the annotation should be loaded
>     return ann.page === 8888;
>   }
> 
> which also worked. But the solution with the url is much better.
> 
> Thanks and regards 
> 
> Alex
> 
> P.S. Do you know how I can change the color of the annotated elements? I miss a good documentation for the offline plugin
> 
> 2015-01-08 15:03 GMT+01:00 Aron Carroll <aron at hypothes.is>:
> Hi Alex,
> 
> You’ll need to provide a custom `should LoadAnnotation` function[1] that takes the url into account.
> 
> Something like:
> 
>     jQuery(‘#content’).annotator().annotator(‘addPlugin’, ‘offline’, {
>       shouldLoadAnnotation: function (ann) {
>         return ann.url === window.location.href;
>       }
>     });
> 
> Hope that helps.
> Aron
> 
> [1]:https://github.com/aron/annotator.offline.js#options
> 
> > On 8 Jan 2015, at 10:24, Alexander Wülfing <alexander.wuelfing at gmail.com> wrote:
> >
> > Hi,
> >
> > is anyone using the offline plugin?
> > https://github.com/aron/annotator.offline.js
> >
> > How can I use it on multiple sites? If I include comments in more then one website I see the annotations from website A in website B as well.
> >
> > Regards and thanks
> >
> > Alex
> > _______________________________________________
> > annotator-dev mailing list
> > annotator-dev at lists.okfn.org
> > https://lists.okfn.org/mailman/listinfo/annotator-dev
> > Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
> 
> 




More information about the annotator-dev mailing list