-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
retrieving word IDs from highlighted text? #14
Comments
There's no support for custom markup I'm afraid. I am hoping to support XPointer-based targets at some point (including for the TEI markup using the CETEIcean library) but I don't know when that will happen. (My main personal interest (as well as my paid jobs...) are focused more around image annotation at the moment.) |
Thanks, can I hack this? Any pointers to where in the code to start? |
Should be hackable in principle. Devil might be in the details. But the code that translates DOM ranges to annotation targets is here: https://github.com/recogito/recogito-client-core/blob/main/src/selection/SelectionUtils.js#L30-L51 If you want the targets to restore properly, too, you'd need to dig deeper, starting here: https://github.com/recogito/recogito-client-core/blob/main/src/highlighter/Highlighter.js#L43 But that might not be necessary. If you just add your own ID selector in parallel to the char offset selector (rather than replace the char offset target with the ID-based one), the annotation would still restore properly when you load it. |
Thanks, that's great, I'll have a stab at it. |
My text looks like this in the browser:
So chearful and sprightly, she ...
and like this in the source:
When I highlight the above line in the browser, can I retrieve
"target": [peh89-239170, peh89-239180, peh89-239190, peh89-239200, peh89-239210, peh89-239220]
or something to that effect? Thanks!
The text was updated successfully, but these errors were encountered: