recogito / recogito-js

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

How to remove the "add reply" part and change UI of the annotation box #110

Open JINO-ROHIT opened 1 week ago

JINO-ROHIT commented 1 week ago

Thanks for the wonderful tool. Can you help me remove the "add reply" part and changing the UI of the annotation box? Id like to extend functionality of this for a personal project

rsimon commented 1 week ago

Hi, thanks for the kind feedback!

Unfortunately, the old RecogitoJS hasn't aged well. Extending the functionality is, by now, almost impossible - at least if you want to use a framework (React etc.) If you just want to get rid of the reply box, I recommend simply applying display: none. to the reply container element in your own CSS stylesheet.

If you want to implement a more comprehensively customized popup, you may want to consider switching to RecogitoJS's successor project. (Currently called, simply, "Recogito Text Annotator"):

https://github.com/recogito/text-annotator-js

The caveat: I did not yet have the time to write documentation. At the moment, you'd have to dig yourself through the source code. (Specifically the demo setups in the test/ directories.) The new version will be especially useful if you use React, BTW. But even the vanilla JS is probably easier to handle than old RecogitoJS.