Page MenuHomePhabricator

Expose content model and format in mw.config
Closed, ResolvedPublic

Description

I think it would be usefull to have something like
wgContentModel = 'wikitext', wgContentFormat = 'text/x-wiki'
available to JavaScript.

Use cases:

  • Almost every gadget that adds some kind of edit tools could use these variables, as most of them make only sense for wikitext.
  • CodeEditor exposes the language in its own variable to decide about the mode. It probably could use these vars instead.
  • Most gadgets for automatic translations think that JS/CSS pages are English and provide useless translations. They could use these variables to only provide translations for content generated from wikitext.

Version: 1.21.x
Severity: enhancement

Details

Reference
bz46835

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:38 AM
bzimport set Reference to bz46835.
bzimport added a subscriber: Unknown Object (MLST).

For wgPageContentModel done in Gerrit change #62178 by Umherirrender. As the actual format is actually useless on rendered pages, I think this bug can be closed as fixed, unless somebody has a use case for it.