scniro / react-codemirror2

Codemirror integrated components for React
MIT License
1.65k stars 192 forks source link

How to invoke CodeMirror's two functions: redo & undo? #214

Open fengnex opened 3 years ago

fengnex commented 3 years ago

Have found that both the Redo and Undo function are quite useful, but don't know how to implement them with react-codemirror2.

Hopefully, there will be certain tips or help, thanks in advance.

fengnex commented 3 years ago

I found that codeEditor.getDoc().undo() or codeEditor.getDoc().redo() could be utilized for manually inputed text, but they do not work for bulk input through codeMirror's pop tips, is there any approach for this problem?

Any help or solution will be greatly appreciated!

Bale123 commented 1 year ago

I found that codeEditor.getDoc().undo() or codeEditor.getDoc().redo() could be utilized for manually inputed text, but they do not work for bulk input through codeMirror's pop tips, is there any approach for this problem?

Any help or solution will be greatly appreciated!

Did you solve it?