How to get delta changes?

Hi everyone. Im new to codemirror and sorry for asking such a simple question. Coming from monaco editor where you would listen to editor updates using

  editor.onDidChangeModelContent((event) => {

where event.changes is an array of changes that looks like

        "range": {
            "startLineNumber": 1,
            "startColumn": 7,
            "endLineNumber": 1,
            "endColumn": 7
        "rangeLength": 0,
        "text": "abcd",
        "rangeOffset": 6,
        "forceMoveMarkers": false

If the text propery has a string then its insertion update otherwise deletion. You also get the range of change is a nice format.

The closest that I’ve got in codemirror is by making an extension like this.

EditorView.updateListener.of((update: ViewUpdate) => {

But the change property doesnt say where the change was made (row and coloumn) and of what type. Sorry If im missing something here.

(Im implementing a multiplayer code editor so I want to broarcast these delta changes to every socket inside a rooom.)

CodeMirror works with flat character positions, not line/column values, but other than that update.changes.iterChanges is probably what you are looking for.