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