Listening and Synchronizing to changes made by codemirror 6

34 Views Asked by At

I want to build a live code editor. I chose codemirror 6 for that. I just want to

  1. Listen to small changes made by codemirror, like typing, erasing, cutting and pasting.
  2. 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..

0

There are 0 best solutions below