annotator脱机插件,如果我们选择显示某些内容的annotator编辑器,但我希望右键单击代码以实现,则必须打开annotator编辑器
$(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()
}
});
启用选定的内容注释器编辑器但我的要求是右键单击注释器时,注释器应处于启用状态