[annotator-dev] Support for spaces in tag names

Apurva Jalit apurva.jalit at gmail.com
Fri Apr 24 09:24:27 UTC 2015


Is there a straightforward way to enable support for space separated tags
in the default annotator tag plugin? I need to support spaces in tag names
and also be able to enter multiple tags at a time separated by say a comma.
For each of the tags, we need to fetch auto completion source via ajax. I
tried the following but it did not work:

    var content = $('body');
    var tags = ["python" ,"javascript", "C++"];
    content.annotator();
    content.annotator('addPlugin', 'Tags')
    content.data('annotator').plugins.Tags.input.autocomplete({
        source: tags,
        multiple: true,
        minLength: 1,
        multipleSeparator: ","
    })

For the sake of simplicity, I have used a local source instead of ajax

Thanks,
Apurva Jalit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150424/d8132d3a/attachment-0003.html>


More information about the annotator-dev mailing list