Background
See r1319919 for context. A VE-specific allowlist of extensions is currently hard-coded into CodeMirrorExtensionRegistry, and similarly there are VE checks in CodeMirror and CodeMirrorPreferences, integrations should be able to say what they want up front. ext.CodeMirror shouldn't know about any specific integration – plain and simple.
The CodeMirror constructor actually accepts a content editable, but only textareas are documented, with VE's content editable as silently supported. We should be supporting content editables anyway, as the upstream lib doesn't care regardless. Textareas are useful in forms, but there are other applications where a content editable may be preferred.
Acceptance criteria
- Make ext.CodeMirror agnostic to integrations
- Accept content editable in addition to textareas
Stretch goals
- Make CodeMirrorVisualEditorHighlight extend CodeMirror, doing only what is minimal and removing CM cruft, along with reliance on the EditorView.