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

Support HTML annotations in content search annotation rendering #224

Open
lukew-cogapp opened this issue Aug 13, 2024 · 0 comments
Open
Assignees
Labels
in progress Work is in progress

Comments

@lukew-cogapp
Copy link

Enhancement suggestion.

Currently, content search only renders plain text, see

Elsewhere in the codebase, you check the body type and use the appropriate component (plain / HTML / VTT / image):

The use case here is for enhancing search results, for example, with:
Text surrounding <mark>your search term</mark> example

However, you may want to sanitise this (perhaps your existing AnnotationItemHTML component does this already?) as I can imagine plenty of markup here that could break things. We do a similar thing on Storiiies viewer:
https://github.com/CogappLabs/StoriiiesViewer/blob/5da2e2a7d3b020f63b789bcb3328f8d0dad1c8ed/src/StoriiiesViewer.ts#L145

@mathewjordan mathewjordan self-assigned this Sep 12, 2024
@mathewjordan mathewjordan added the in progress Work is in progress label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Work is in progress
Projects
None yet
Development

No branches or pull requests

2 participants