Giter Site home page Giter Site logo

Comments (4)

alhuber1502 avatar alhuber1502 commented on May 20, 2024 1

Thanks, that's great, I'll have a stab at it.

from recogito-js.

rsimon avatar rsimon commented on May 20, 2024

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

from recogito-js.

alhuber1502 avatar alhuber1502 commented on May 20, 2024

Thanks, can I hack this? Any pointers to where in the code to start?

from recogito-js.

rsimon avatar rsimon commented on May 20, 2024

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.

from recogito-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.