Imagine you have a page with 2+ CodeMirror instances. I’d like to allow the user to type into multiple instances at the same time.
What’s the best way of going about this?
Imagine you have a page with 2+ CodeMirror instances. I’d like to allow the user to type into multiple instances at the same time.
What’s the best way of going about this?
The browser will only focus one editor, and CodeMirror itself only shows a visible cursor in the focused editor. But you could probably add CSS that makes it visible when you add some class to the editor (or even reuse the built-in cm-focused class for pseudo-focused editors). And then maybe look at the key events and text input transactions in the actually-focused editor and forward them to the others.