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

[Feature Request] Ability to highlight #10

Open
kyagie opened this issue Sep 28, 2022 · 5 comments
Open

[Feature Request] Ability to highlight #10

kyagie opened this issue Sep 28, 2022 · 5 comments

Comments

@kyagie
Copy link

kyagie commented Sep 28, 2022

Can highlighting be added?

@jspizziri jspizziri changed the title [feature request] Ability to highlight [Feature Request] Ability to highlight Sep 28, 2022
@jspizziri
Copy link
Contributor

@kyagie theoretically any feature that's supported by readium can be implemented in this library. Are you able to submit a PR? I can provide guidance.

@TechWilk
Copy link

@jspizziri I'd appreciate if you could share your guidance for this as I might be able to find time to work on it

@jspizziri
Copy link
Contributor

jspizziri commented Mar 28, 2023

@TechWilk thanks for expressing interest!

The first thing I'd recommend is taking a look at the swift-toolkit and the kotlin-toolkit which this project wraps. Specifically, you can look at the Test Apps that are included in those projects and how they implement highlighting.

Next I suppose we'd need to decide on what the interface for this library is based on that. There's probably some basic highlight data structure/interface that we'd need to pass into readium from RN. My guess is it will take something of the following form:

<ReadiumView
  highlights={[some array of highlight datastructures]}
  onHighlight={(highlight) => {}}
/>

LMK if that makes sense or if I can provide more guidance.

@mickael-menu
Copy link

In the Readium toolkit, we use the term Decoration instead of "highlight" because they can be used for other use cases (TTS, search...) or even other types of decorations (e.g. page marks). Highlights are only mentioned in the Test App, where they basically associate a Decoration style to a Locator in the database.

You can find a high-level spec for the Readium Decorator API here: https://readium.org/architecture/proposals/008-decorator-api.html

And here's a concrete explanation of how to use the Swift API (we don't have user guides for the Decorator API yet): readium/swift-toolkit#17 (comment)

@mickael-menu
Copy link

Here's an example that uses Decorations that don't look like highlights: readium/kotlin-toolkit#310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Scheduled
Development

No branches or pull requests

4 participants