Not the one you're replying to, but "my" system is an Angular application that makes heavy use of CodeMirror.
One instance for the base editor, and one instance for the currently active cell. The other cells are rendered to HTML through a different code path (no CodeMirror involved there).
For rendering mathematical formulas it uses MathJax.
A global context-based keyboard handler such as the one in VSCode allows for Emacs key bindings.