annotator is working when the selected content annotator editor enabled but my requirement is on right click annotator should enabled how answers?

Viewed 144

annotator offline plugin if we selected some content annotator editor is showing but i want code to implement on right click it has to open the annotator editor

$(function () {

//$(document).ready( function (){
    $.contextMenu({// this is for on right click option showing like Annotator 
        selector: '.context-menu-one',
        callback: function (key, options) {
            var m = "clicked: " + key;

            $(".annotator-outer").css({ 'display': 'block' });
        },
        items: {
            "annotator": { name: "Annotator" },
        }
    })
})  


var content = $("#content").annotator(); // this is for loading the annotator script call function
content.annotator('addPlugin', 'Offline', {
    online: function () {
        $("#status").text("Online");
    },
    offline: function () {
        $("#status").text("Offline");
    }
});
var annotator = content.data('annotator');

$("#clear-storage").click(function () {
    if (annotator) {
        annotator.plugins.Offline.store.clear()
    }
});

annotator is working when the selected content annotator editor enabled but my requirement is on right click annotator should enabled how can i implement

0 Answers
Related