react-highlight-within-textarea
react-highlight-within-textarea copied to clipboard
Selection on highlighted word on single click.
Is selecting on highlighted word on singlie click possible? I've tried but the highlighted text rerenders every click, therefore the word gets unselected.
There isn’t any built-in support for this. Also note that “highlight” != selection. Highlight is simply decorating parts of the code. Selection is combination of focus and anchor. There is an interface to set the selection, though. Search for selection in https://bonafideduck.github.io/react-highlight-within-textarea/#selection.