I want to build a live code editor. I chose codemirror 6 for that. I just want to
- Listen to small changes made by codemirror, like typing, erasing, cutting and pasting.
- Get those changes through some api, and then synchronize those changes to another instance of a code mirror editor.
I banged my head through a lot of documentations but couldn't make much sense out of them. Can someone help me save some time?
function Editor() {
return <Codemirror --some properties-- aFunctionThatCanListenToChanges() aFunctionThatCanSynchronizeToChanges() />
}
see if you can understand something from this pseudo code example..