Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this plugin? #3

Open
Nirvanatin opened this issue Jul 15, 2018 · 1 comment
Open

How to use this plugin? #3

Nirvanatin opened this issue Jul 15, 2018 · 1 comment

Comments

@Nirvanatin
Copy link

Nirvanatin commented Jul 15, 2018

Would you please give an example on how to pass 3 categories and use this plugin? I have already converted it to JS but I don't know how to call the function.

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

// Add your plugin.
content.annotator('addPlugin', 'Categories' /*, any other options */);```
@mwidner
Copy link
Member

mwidner commented Jul 16, 2018

The third parameter ("other options") should be a JSON object of settings. The main one you want is the category names. Here's an example:

content.annotator('addPlugin', 'Categories', {'category': ['Category1', 'Category2', 'Category3']});

@Nirvanatin
Copy link
Author

Thanks for your help. Is this plugin compatible with Annotator v2.0.0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants