Closed souuu closed 4 years ago
The solution is that I have to use the controlled mode and onBeforeChange
<CodeMirror
value={value}
options={{
mode: 'javascript',
lineNumbers: true
}}
onBeforeChange={(editor, data, value) => {
onChange(value)
}}
/>
Hello, Does anyone have this problem ? When I type in the middle of the code, the cursor go to the end of line and start typing in the end.
Does anyone know how to fix this ? Thank you,