Page MenuHomePhabricator

JSON syntax highlighting and linting inside templatedata tags in CodeMirror
Open, Stalled, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
It would be nice to have syntax highlighting and linting of content inside templatedata tags in CodeMirror. This content is enforced to be JSON at saving (see extension page), but currently there is no way to check if the content inside the tags is correct JSON until saving or previewing.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution): templates documentation edition

Benefits (why should this be implemented?): It would ease some cases were manual edition of the templatedata without the wizard is necessary, like when editing maps attribute.

Details

Event Timeline

JSON linting inside <templatedata> will be available when we upgrade WikiParser-Node to v1.34.0.

JSON linting inside <templatedata> will be available when we upgrade WikiParser-Node to v1.34.0.

Thank you

CodeMirror's JSON support should also work for <maplink> and <mapframe>.

Change #1277267 had a related patch set uploaded (by Bhsd; author: Bhsd):

[mediawiki/extensions/CodeMirror@master] mediawiki worker: upgrade wikiparser-node

https://gerrit.wikimedia.org/r/1277267

Change #1277267 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] mediawiki worker: upgrade wikiparser-node

https://gerrit.wikimedia.org/r/1277267

Bhsd changed the task status from Open to Stalled.May 31 2026, 12:23 AM

JSON linting is now provided by the worker, but JSON highlighting requires T357480.