[annotator-dev] Plugin Development Question

Ulrike Schmidt ulrike at gol.com
Wed Oct 9 19:10:28 UTC 2013


Ooops, it is my expectations that were wrong. The message does not 
appear in the editor, but when I finish editing and then hover
over the annotation, it does appear. Problem solved! :-)



Am 08.10.13 23:58, schrieb Ulrike Schmidt:
> 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
>>
>
>
>
> _______________________________________________
> 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/20131009/be71838f/attachment-0002.html>


More information about the annotator-dev mailing list