I need a react component that will allow me to display a text for which I can easily capture the selected text region, and then create nested spans inside it (to, e.g. highlight text regions). The spans should then be able to be managed independently (with their own "onclick" actions, for example).
I understand this is a very specific behaviour. My goal is not to ask whether there is a component that can meet all my requisites, but whether there is something that can be used as a base to get most of this behaviour in a more or less straightforward way (that is, without having to manually deal with <p>
's and document.getSelection()
). Does something like this exist?