recogito / recogito-js

A JavaScript library for text annotation
BSD 3-Clause "New" or "Revised" License
349 stars 38 forks source link

Allow style and data attributes in formatter (#57) #95

Closed blms closed 6 months ago

blms commented 6 months ago

Hi @rsimon! Here's a PR to address the first two bullet points of https://github.com/recogito/recogito-js/issues/57.

Working with a client (eScriptorium) that uses recogito-js and needs colors pulled from an API endpoint dynamically applied to annotations, so we need to be able to pass the custom style attribute like in Annotorious.

The comments and some code were cribbed directly from Annotorious 😄

rsimon commented 6 months ago

Hi @blms, looks great - thanks!

Great to hear that eScriptorium is using RecogitJS, BTW. I think I remember having discussions with them about it (quite a while back though). I'd be interested in hearing more about the type of content they are using it with. Also in terms of whether it might be possible to upgrade them to the successor library at some point?

blms commented 6 months ago

@rsimon They are using it with HTR transcription content, mostly (I believe) to mark metatextual things like insertions in marginalia. We will recommend the successor library upgrade to them!