let state = EditorState.create({
extensions: [updateListenerExtension]
});
Is there a way to attach a listener to an existing item on the page? I need to do this from an extension so I want to make sure I don’t break the 3rd-party editor by recreating the whole state.
There is a way to attach extensions, but for that you do need access to the StateEffect.appendConfig value that the codemirror instance you want to listen to uses. The way codemirror/javascript works now, there is no way to do that…
Thank you! I suppose this is a start to move things along in my PR. I’m thinking about using the input event to track keypresses and then use the polling to complement that and update the field twice per second.
I hope a helper for this will be implemented in CM6 however