react-highlight-within-textarea icon indicating copy to clipboard operation
react-highlight-within-textarea copied to clipboard

Selection on highlighted word on single click.

Open djwondersco opened this issue 3 years ago • 1 comments

Is selecting on highlighted word on singlie click possible? I've tried but the highlighted text rerenders every click, therefore the word gets unselected.

djwondersco avatar Nov 02 '22 12:11 djwondersco

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.

bonafideduck avatar Nov 03 '22 11:11 bonafideduck