Closed deepeshk12 closed 7 years ago
There is an ongoing initiative with hypothesis.js (see this post). A PR will soon be pushed by Evident Point on the Readium repo.
In the interim, you can enable the "text highlighting" functionality (not a fully fledged annotation feature, but you can implement a more complete system based on this building block), by activating the plugin in readium-shared-js
: https://github.com/readium/readium-shared-js/blob/develop/plugins/plugins.cson
Example usage: https://github.com/readium/readium-js-viewer/blob/develop/src/js/EpubReader.js#L1167
readium.reader.plugins.highlights.initialize({
annotationCSSUrl: readerOptions.annotationCSSUrl
});
readium.reader.plugins.highlights.on("annotationClicked", function(type, idref, cfi, id) {
console.debug("ANNOTATION CLICK: " + id);
readium.reader.plugins.highlights.removeHighlight(id);
});
https://github.com/readium/readium-js-viewer/blob/develop/src/js/EpubReader.js#L851
$(".icon-annotations").on("click", function () {
readium.reader.plugins.highlights.addSelectionHighlight(Math.floor((Math.random()*1000000)), "test-highlight");
});
@llemeurfr Hi, I have read the post you mentioned, looks like an exciting feature. The post says the annotation will be launched in summer 2007. Summer is passing half the way. When will it be ready to use? Thanks.
@danielweck Can you tell me how is going with the hypothesis.js project? Thanks.
Hi @hz0324, please follow readium/readium-shared-js#396 to get updates on this project.
hypothesis is working, but the highlight does not work, I already enabled it in the cson package, what to do to work?
How can I enable Annotation feature.
This issue is a Question