[annotator-dev] Margin Viewer Plugin
Michael Head
mhead at live.unc.edu
Tue Mar 17 15:07:47 UTC 2015
Rick,
Looking at the source https://github.com/habeanf/annotator/blob/master/src/plugin/marginviewer.coffee <https://github.com/habeanf/annotator/blob/master/src/plugin/marginviewer.coffee>, it looks like you have the right name to use since it has this line:
class Annotator.Plugin.MarginViewer extends Annotator.Plugin
If you have trouble getting that particular plugin to work, I think this is a similar margin viewer plugin with a bit more documentation on initialization: https://github.com/albertjuhe/annotator_view <https://github.com/albertjuhe/annotator_view>
If you have an example set up somewhere we can take a look at, that would be helpful.
Michael
> On Mar 16, 2015, at 3:17 AM, Rick <rmercer33 at gmail.com> wrote:
>
> I want to try out the Margin Viewer annotator plugin but can't find any docs showing how to initialize it. I'm using annotator 1.2.9. I got the coffeescript code from Github and have compiled it to js.
>
> Not sure what name to use during initialization. Here's my init code. Would sure appreciate any insight.
>
> Thanks,
>
> Rick
>
> this.$('#document').annotator()
> .annotator("addPlugin", 'Store', {
> prefix: '/api',
> urls: {
> create: '/a',
> update: '/a/:id',
> destroy: '/a/:id',
> search: '/a/get'
> },
> annotationData: {"docId":this.data._id, "userId":Meteor.userId()},
> loadFromSearch: {
> "user": Meteor.userId(),
> "doc":this.data._id
> }
> })
> .annotator("addPlugin", 'StoreLogger')
> .annotator("addPlugin", 'Permissions', {
> user: userInfo,
> userId: function(user) {
> if (user && user.id <http://user.id/>) {
> return user.id <http://user.id/>;
> }
> else
> return user
> },
> userString: function(user) {
> if (user && user.id <http://user.id/>) {
> return user.email;
> }
> else
> return user
> },
> permissions: {
> 'read': [userInfo.id],
> 'update': [userInfo.id],
> 'delete': [userInfo.id],
> 'admin': [userInfo.id]
> },
> showViewPermissionsCheckbox: false,
> showEditPermissionsCheckbox: false
> })
> .annotator('addPlugin', 'Tags')
> .annotator('addPlugin', 'Share', {
> shareIn:['email','facebook','twitter']
> })
> .annotator("addPlugin", 'MarginViewer')
> .annotator("addPlugin", 'Markdown');
> }
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150317/ec7ac6f6/attachment-0004.html>
More information about the annotator-dev
mailing list