Page MenuHomePhabricator

Bundle Extension:CodeMirror with MediaWiki core
Open, Needs TriagePublicFeature

Description

Mentioned at https://www.mediawiki.org/wiki/Suggestions_for_extensions_to_be_integrated#CodeMirror

I think CodeMirror is an obvious candidate for bundling - it's a widely-used extension (including on most Wikimedia sites), and it works nicely with both VisualEditor and WikiEditor. The relatively new "Used by" template lets us see the popularity of extensions among different wiki farms and distributions, and as you can see, CodeMirror is used by 5 of the current 7 selections, - indicating that many people consider it an essential part of the MediaWiki experience. Yaron Koren (talk) 15:12, 21 July 2022 (UTC)

Support integration to core Krabina (talk) 09:20, 13 January 2023 (UTC)
Update - now it's 7 out of 14 for "Used by", which I think is still an impressively high number. Yaron Koren (talk) 13:34, 13 March 2023 (UTC)
Support bundling or core. --鈴音雨 (talk) 13:14, 2 May 2024 (UTC)
Support. Essential. Indispensible especially for writing templates using combinations of tags, parser functions, magic words and what not (for instance, it gives you a better clue about the position of your opening and closing braces, which can be incredibly hard to tell apart if everything has the same dark colour). Cavila 07:04, 9 August 2024 (UTC)
Support * Pppery * it has begun 15:54, 17 August 2024 (UTC)

https://www.mediawiki.org/wiki/Extension:CodeMirror

The CodeMirror extension provides syntax highlighting in MediaWiki wikitext editors using the CodeMirror library. For usage and a list of features, see Help:Extension:CodeMirror.

Checklist:

(note unticked items might need to be checked; they haven't because OP doesn't really understand their meanings).

  • Passed discussion or already Wikimedia deployed
  • Passed security review or already Wikimedia deployed
  • Voting CI structure tests
  • Runs MediaWiki-CodeSniffer
  • Runs phan
  • Supports MySQL, SQLite, and Postgres (if there are schema changes)
  • GPL v2 or later compatible license
  • Extension's default configuration provides optimal experience
  • Tested with web installer
  • Any relevant dependencies also bundled

(subtask of T333405)

Event Timeline

We should wait until T373711: Add support for Scribunto, JavaScript, CSS, JSON and Vue to CodeMirror 6 is resolved. There is no reason to bundle both CodeEditor and CodeMirror.

Peachey88 subscribed.

(subtask of T333405)

Please actually set Subtask status, instead of just describing it in the text.

taavi raised the priority of this task from Medium to Needs Triage.Apr 15 2025, 8:28 AM
taavi subscribed.

Please do not set priorities unless you actually plan to work on something.

We should wait until T373711: Add support for Scribunto, JavaScript, CSS, JSON and Vue to CodeMirror 6 is resolved. There is no reason to bundle both CodeEditor and CodeMirror.

CodeEditor is not used for wikitext. CodeMirror is. The vast majority of installs probably would want CodeMirror and not CodeEditor. But the price of inclusion seems fairly low, so I'm not really sure why you'd advocate for one and not the other.

MusikAnimal subscribed.

Thanks for filing this task! I was going to create one as well, eventually. We are still in "beta" for CodeMirror 6. I'd say it makes more sense to wait until that is finished before bundling. We are on track to have everything done by MW 1.45 (December).

T373711: Add support for Scribunto, JavaScript, CSS, JSON and Vue to CodeMirror 6 should be completed in a month or so. Then any discussion about replacing CodeEditor will follow, and that discussion will probably dictate whether or not the bundle should include CodeEditor or not.

Agree that this should be bundled, but wait till v6 is out of beta.