Background
MediaWiki-extensions-CodeMirror has evolved into a diverse editing environment with numerous preferences, features, and an extendable interface. Up until 2026, it was available only as an opt-in feature of WikiEditor (2010) and VisualEditor-MediaWiki-2017WikitextEditor. Since then it is also available as the so-called "standalone CodeMirror" — the 2003 editor (plain textarea) with CodeMirror on top.
The only thing keeping CodeMirror from being perceived as a different editor from a user perspective seems to boil down to a toolbar. This can be created, hopefully with backwards-compatibility with WikiEditor.
Where we are today (September 2026)
The Wikimedia cluster has two checkbox preferences allowing you to change the "editor":
- Enable the editing toolbar (This is sometimes called the '2010 wikitext editor')
- Use the VisualEditor toolbar—which includes the automatic citation tool—in the Source editor too (This is sometimes called the '2017 wikitext editor'.)
On top of that CodeMirror, is offered as the "Enable syntax highlighting" and "Enable syntax highlighting for code" preferences, even though it does a lot more than syntax highlighting.
Problem
CodeMirror is branded as the "syntax highlighting" feature, but yet it offers enough features that users are genuinely confused about how to turn it off or adjust its settings, even with a "Syntax" button glaring at them. After all, it's possible to use CodeMirror without syntax highlighting (T419339)! So to say the least, the nomenclature needs revisiting. Simply calling it "syntax highlighting" is insufficient. It is a full-on stream parser offering IDE-like functionality, and I think ideally we'd preset it to users as such.
Newbie birds-eye view back at the preferences, at first glance WikiEditor implies it's the only option with a toolbar, yet the 2017 editor offers one too. Secondly, the two preferences are mutually exclusive, yet presented as checkboxes as if both can be true.
In the case of the 2017 editor, not much more needs to be said for CodeMirror, because it is only used as a syntax highlighter. You get a toolbar, and an option to enable syntax highlighting. But for the 2010 editor, it radically changes the editing experience. Users get confused, stuck, and don't know how to or if it's possible to tweak the various settings (T425739, T434695). Meanwhile, some projects want to enable this for all new users by default (T288161).
Fortunately, the one thing that does seem intuitive is the concept of "visual" versus "source" editing. So the problem then just lies on giving users the ability to change which wikitext editor they normally want.
A collection of ideas
- Rename the "Syntax highlighting" preference to something more distinctive, perhaps "CodeMirror" by itself is fine (?)
- CodeMirror does a lot more than just syntax highlighting, after all
- There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors. – Phil Karlton / Leon Bambrick
- Add a CodeMirror toolbar (T95148)
- This is what can be shown in the 2003 editor when CodeMirror is enabled, as well as other contexts where we don't use WikiEditor such as Special pages (i.e. T418811, T384148)
- Ultimately, perhaps the 2003 editor (which is just a plain textarea), combined with CodeMirror, is what the "new" CodeMirror editor will be
- We should try to maintain backwards compatibility with WikiEditor integrations for the mediawiki mode (T436607#12278442).
- Change the dual checkbox preferences for the wikitext editor to a dropdown, something like:
- Wikitext editor:
- Plain textarea (This is sometimes called the '2003 wikitext editor')
- WikiEditor (This is sometimes called the '2010 wikitext editor')
- VisualEditor toolbar (This is sometimes called the '2017 wikitext editor'.)
- CodeMirror (This is sometimes called the '2026 wikitext editor'.)
- Wikitext editor:
- …
