[annotator-dev] annotator-dev Digest, Vol 30, Issue 6

Rouan Wilsenach rwilsen at thoughtworks.com
Fri Oct 11 07:05:52 UTC 2013


James, I'd suggest setting the style in a CSS file, rather than trying to
do it in Javascript. You can use the developer tools of your browser to see
which class you need to style for the desired effect.

Rouan


On 11 October 2013 03:55, Gong Huaiyu James (NCS) <jamesh at ncs.com.sg> wrote:

> Dear annotator developers:
>         I want to change the text colour in the Viewer, but I failed to
> change it.
>
> The both way not working:
>
>                  .subscribe("annotationViewerTextField", function
> (field,annotation) {
>                             field.innerHTML = "<font color='red'>" +
> field.innerHTML + "</font>";
>                           })
>
>                  .subscribe("annotationViewerTextField", function
> (field,annotation) {
>                             field.outerHTML = "<font color='red'>" +
> field.outerHTML + "</font>";
>                           })
>
> Any idea how to change the view text colour?
>
>
> Thanks
>
>
> -----Original Message-----
> From: annotator-dev-bounces at lists.okfn.org [mailto:
> annotator-dev-bounces at lists.okfn.org] On Behalf Of
> annotator-dev-request at lists.okfn.org
> Sent: Wednesday, 9 October, 2013 7:00 PM
> To: annotator-dev at lists.okfn.org
> Subject: annotator-dev Digest, Vol 30, Issue 6
>
> Send annotator-dev mailing list submissions to
>         annotator-dev at lists.okfn.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.okfn.org/mailman/listinfo/annotator-dev
> or, via email, send a message with subject or body 'help' to
>         annotator-dev-request at lists.okfn.org
>
> You can reach the person managing the list at
>         annotator-dev-owner at lists.okfn.org
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of annotator-dev digest..."
>
>
> Today's Topics:
>
>    1. Plugin Development Question (Ulrike Schmidt)
>    2. Re: Plugin Development Question (Randall Leeds)
>    3. Re: Plugin Development Question (Ulrike Schmidt)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 08 Oct 2013 17:34:13 +0200
> From: Ulrike Schmidt <ulrike at gol.com>
> Subject: [annotator-dev] Plugin Development Question
> To: annotator-dev at lists.okfn.org
> Message-ID: <525425F5.4090306 at gol.com>
> Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
>
> Hello,
>
> I am trying to develop a plugin for annotator that adds fields to the
> viewer and had a close look at
> https://github.com/okfn/annotator/wiki/Plugin-Development. Unfortunately
> the following example code from the wiki does not work:
>
> Annotator.Plugin.Message  =  function  (element,  message)  {
>    var  plugin  =  {};
>
>    plugin.pluginInit:  function  ()  {
>        annotator.viewer.addField({
>          load:  function  (field,  annotation)  {
>            field.innerHTML  =  message;
>          }
>        })
>    };
>
>    return  plugin;
> }
>
>
> Could someone enlighten me on how to get this working?
>
> Thanks!
>
> Ulrike
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.okfn.org/pipermail/annotator-dev/attachments/20131008/fcbfcb9e/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 8 Oct 2013 10:11:13 -0700
> From: Randall Leeds <tilgovi at hypothes.is>
> Subject: Re: [annotator-dev] Plugin Development Question
> To: ulrike at gol.com
> Cc: annotator-dev at lists.okfn.org
> Message-ID:
>         <CAFmY2kLvNpHkcgAJ7xgt=-bFSNXu=
> wvQCaQTtrv_d29MGBPO5Q at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Looks like it should be "this.annotator".
>
> Do you get a stack trace? Console errors?
> On Oct 8, 2013 8:43 AM, "Ulrike Schmidt" <ulrike at gol.com> wrote:
>
> >  Hello,
> >
> > I am trying to develop a plugin for annotator that adds fields to the
> > viewer and had a close look at
> > https://github.com/okfn/annotator/wiki/Plugin-Development.
> > Unfortunately the following example code from the wiki does not work:
> >
> > Annotator.Plugin.Message = function (element, message) {
> >   var plugin = {};
> >
> >   plugin.pluginInit: function () {
> >       annotator.viewer.addField({
> >         load: function (field, annotation) {
> >           field.innerHTML = message;
> >         }
> >       })
> >   };
> >
> >   return plugin;}
> >
> >
> > Could someone enlighten me on how to get this working?
> >
> > Thanks!
> >
> > Ulrike
> >
> >
> >
> > _______________________________________________
> > annotator-dev mailing list
> > annotator-dev at lists.okfn.org
> > http://lists.okfn.org/mailman/listinfo/annotator-dev
> > Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.okfn.org/pipermail/annotator-dev/attachments/20131008/e3f0f84e/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 08 Oct 2013 23:58:57 +0200
> From: Ulrike Schmidt <ulrike at gol.com>
> Subject: Re: [annotator-dev] Plugin Development Question
> To: Randall Leeds <tilgovi at hypothes.is>
> Cc: annotator-dev at lists.okfn.org
> Message-ID: <52548021.20902 at gol.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> The first problematic line is:
>
> plugin.pluginInit:  function  ()  {
>
>
> Firebug says: " invalid label"
>
> So I changed it to:
>
> plugin.pluginInit = function () {
>
>
> Firebug says: " annotator is not defined"
>
>
> Am 08.10.13 19:11, schrieb Randall Leeds:
> >
> > Looks like it should be "this.annotator".
> >
> > Do you get a stack trace? Console errors?
> >
>
> With this I get no Console errors, but also no message if I add the plugin
> according to the wiki instructions and make an annotation:
>
> $('body').annotator().annotator('addPlugin', 'Message', 'Hello World!')
>
>
> > On Oct 8, 2013 8:43 AM, "Ulrike Schmidt" <ulrike at gol.com
> > <mailto:ulrike at gol.com>> wrote:
> >
> >     Hello,
> >
> >     I am trying to develop a plugin for annotator that adds fields to
> >     the viewer and had a close look at
> >     https://github.com/okfn/annotator/wiki/Plugin-Development.
> >     Unfortunately the following example code from the wiki does not work:
> >
> >     Annotator.Plugin.Message  =  function  (element,  message)  {
> >        var  plugin  =  {};
> >
> >        plugin.pluginInit:  function  ()  {
> >            annotator.viewer.addField({
> >              load:  function  (field,  annotation)  {
> >                field.innerHTML  =  message;
> >              }
> >            })
> >        };
> >
> >        return  plugin;
> >     }
> >
> >
> >     Could someone enlighten me on how to get this working?
> >
> >     Thanks!
> >
> >     Ulrike
> >
> >
> >
> >     _______________________________________________
> >     annotator-dev mailing list
> >     annotator-dev at lists.okfn.org <mailto:annotator-dev at lists.okfn.org>
> >     http://lists.okfn.org/mailman/listinfo/annotator-dev
> >     Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.okfn.org/pipermail/annotator-dev/attachments/20131008/60ff91f8/attachment-0001.htm
> >
>
> ------------------------------
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: http://lists.okfn.org/mailman/optionss/annotator-dev
>
>
> End of annotator-dev Digest, Vol 30, Issue 6
> ********************************************
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20131011/39e46e52/attachment-0002.html>


More information about the annotator-dev mailing list