mediawiki.api.parse: Specify wikitext as the content model
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Wed, 19 Jun 2013 10:53:23 +0000 (10:53 +0000)
committerKrinkle <krinklemail@gmail.com>
Fri, 21 Jun 2013 06:08:22 +0000 (06:08 +0000)
The parse API defaults to use the content model of the title, which
defaults to "API" in the main namespace which can be configured to have
a different content model.

Bug: 48201
Change-Id: I51143873e3782df4df500194a7ac71c4b446746b

resources/mediawiki.api/mediawiki.api.parse.js

index 4044655..08bb171 100644 (file)
@@ -23,6 +23,7 @@
 
                        apiPromise = this.get( {
                                        action: 'parse',
+                                       contentmodel: 'wikitext',
                                        text: wikitext
                                } )
                                .done( function ( data ) {