Hello and sorry for asking such a basic question. I may be just misunderstanding this new structure where everything is an object/module. I have used code mirror 5 for a long time and am now migrating to v6
In CodeMirror 5, I would subscribe to change events like so
editor.on('change', (args) => { doStuff() } )
In CodeMirror 6, I have something like this:
EditorView.updateListener.of((v: ViewUpdate) => {
// Do something
})
But this fires on every key press. Thus I’m checking for focusChanged as a workaround. Is there a more direct way to just listen for the native change event?
Where can I find a working example of how to use domEventHandlers? Listening to change event is a pretty basic thing and I have spent hours trying to figure this out.