Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the Annotation #629

Closed
deepeshk12 opened this issue Jul 17, 2017 · 7 comments
Closed

Enable the Annotation #629

deepeshk12 opened this issue Jul 17, 2017 · 7 comments

Comments

@deepeshk12
Copy link

How can I enable Annotation feature.

This issue is a Question

@llemeurfr
Copy link

There is an ongoing initiative with hypothesis.js (see this post). A PR will soon be pushed by Evident Point on the Readium repo.

@danielweck
Copy link
Member

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");
        });

@hz0324
Copy link

hz0324 commented Jul 31, 2017

@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.

@hz0324
Copy link

hz0324 commented Aug 16, 2017

@danielweck Can you tell me how is going with the hypothesis.js project? Thanks.

@llemeurfr
Copy link

Hi @hz0324, please follow readium/readium-shared-js#396 to get updates on this project.

@DougsAraujo
Copy link

hypothesis is working, but the highlight does not work, I already enabled it in the cson package, what to do to work?

@danielweck
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants