Hi all I'm trying to focus back on the Annotator but after some days, I think that I'm in trouble. I have the strong impression that the doc is not really in sync with the code; I've been reading the code of many plugins, but I could not say which one can be taken as an example. I'm stumbling on deprecated stuff at every few lines, and I cannot understand how could it be so straightforward in the past, and so twisted-up now.
So for instance, what is the "current" way to add callbacks to events, "subscribe" or "listenTo"??? Then, when should I call this subscription in? in the constructor or in the "pluginInit"? Is "pluginInit" still used by the way??? Another problem for me is that the code of most plugins imply calls to plugins that the Annotator now discourages. It seems that such plugins were built on foundations now superseded. Of course, one does not want to start coding "legacy" code. Plus, AFAIK "deprecation" is not the same as "accepting legacy code". When "deprecation" comes, a coder is warned. IIRC, the Annotator allows selecting a text area wraps a selected text area in a CSS class, thus highlighting it. So far, so good. A plugin like Offline seems to allow storing annotations in a "cache" object less convoluted than Annotator.Util.$.cache and use that object when managing remote storage. A plugin like "NullStore" is there for... who knows? being overwritten? f***ing my brain up? :-) So, I wonder whether is there a plugin that I could refer to as a sample of good "current" coding. That would be a "lighthouse" for me and break this bad feeling of "deprecation" that starts making me uncomfortable. Thank you! Ernesto Torresin _______________________________________________ annotator-dev mailing list [email protected] https://lists.okfn.org/mailman/listinfo/annotator-dev Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
