Background
This is the task to formally propose replacing CodeEditor with MediaWiki-extensions-CodeMirror on Wikimedia wikis (T373711 was getting too noisy). So far for users of the "Improved Syntax Highlighting" beta feature – which forces use of CodeMirror over CodeEditor – reception has largely been positive. We have a goal of shipping CM6 by MW 1.46 in May–June 2026, and it would make configuration and maintenance easier if we went forward with replacing CodeEditor at the same time.
Note however this initially will only effect action=edit pages, i.e. when editing JS/CSS/JSON/Vue and Lua. See below for the outstanding integrations that still need addressing.
Why?
Pros
- User preferences are consistent across all editors (for CodeEditor that is/was T261118)
- User experience is more consistent across all editors
- JavaScript integrations from extensions, gadgets, etc. work the same for all editors (even the 2017 editor, to a degree)
- Maintenance is simpler as everything is under one roof
- Users can opt to have syntax highlighting without WikiEditor (i.e. the toolbar), if they so desire
- Better autocompletion
- Better linting tools (T373711#10350551), including linting against unsupported JS/CSS (T394965)
- Dark mode support
- Fully localized
Cons
- Complete feature parity is unlikely, but we should be able to port over whatever users consider the most important features
- Fixes something that arguably isn't broken (apart from perhaps the outdated linters)
- If something in CodeMirror breaks, it may affect editing in all content models (counterpoint to the "pro" above of being able to fix everything at once)
Other integrations
We plan to tackle these as well, so that eventually CodeEditor is not used at all and can be removed from WMF wikis. Until then, these can live happily as-is, and are not blockers for replacing CodeEditor for editing pages (action=edit) directly on the wiki.
- T399673: Add CodeMirror mode for AbuseFilter syntax
- T400014: Add ve.ui.MWCodeMirrorEditorWidget for CodeMirror support in VisualEditor's code editor
- T400015: Add CodeMirror integration in WikiLambda as an alternative to CodeEditor
Blockers
Anything deemed a potential blocker should be a subtask of this task. Note that some things like T413457, T419331 and T412883 are on our radar but not considered blockers for the CodeEditor-to-CodeMirror switchover.