scniro / react-codemirror2

Codemirror integrated components for React
MIT License
1.66k stars 193 forks source link

'around' option in replaceSelection does not work correctly. #196

Open kdby-io opened 4 years ago

kdby-io commented 4 years ago

If I replace selection like below in original codemirror, new text are selected. But in react-codemirror2, wrong text are selected.

doc.replaceSelection('**' + text + '**', 'around');