I made a comment at T101246#4062458, from which I can quote (but made tweaks).
The feature works at the 2003 wikitext editor (the one without the javascript-coded toolbars filled with buttons as seen in later WikiEditors). I just have to:
- Enable the Toolbar in Preference settings
- Enable the "Syntax Highlighting" feature in the Beta Preference
- Click the syntax highlighting button in the Toolbar
- Disable the Toolbar without disabling the feature
I originally discussed this at https://meta.wikimedia.org/wiki/Talk:Community_Tech/Wikitext_editor_syntax_highlighting#Not_working_in_2003_WikiEditor_and_whether_to_enable_or_disable_by_default . How do you allow directly enabling or disabling the feature in the 2003 WikiEditor without needing to enable the Toolbar to click on the "Highlighter" icon button? If Remember the dot's Syntax highlighter feature can be directly opt-in/opt-out without a Toolbar, why not this other feature?
Acceptance criteria
With CodeMirror 6 enabled:
- The previously hidden preference for syntax highlighting should be surfaced at Special:Preferences under "Editing", in a new section called "Syntax highlighting".
- This is the same preference as the toggle button in WikiEditor. So if you disable CodeMirror in WikIEditor, the preference should also appear disabled in Special:Preferences.
- The preexisting "Enable colorblind-friendly scheme…" preference should now be under "Syntax highlighting" too, instead of under "Accessibility"
- With the preference enabled and "Enable the editing toolbar" disabled, CodeMirror should work where it normally would with WikiEditor (editing pages, read-only pages)
With CodeMirror 6 disabled:
- No syntax highlighting should be possible unless WikiEditor ("Enable the editing toolbar") is also enabled.
- The preferences should appear as they do now in production, with the "Accessibility" section and the single "Enable colorblind-friendly scheme…" preference.