Private
parametersStores the return value of parseParameters.
A deep copy can be retrieved by getParameters.
Private
revisionStores the return value of fetch when a Wikitext instance is created by newFromTitle.
A deep copy can be retrieved by getRevision.
Private
sectionsStores the return value of parseSections.
A deep copy can be retrieved by getSections.
Private
tagsReadonly
wikitextThe wikitext from which the Wikitext instance was initialized.
Returns the byte length of the wikitext.
Returns the length of the wikitext.
Get a deep copy of parameters, which is a private property available only when parseParameters has
been called at least once. Note that parseParameters returns a (filtered) deep copy of parameters
on a non-first call, so simply call the relevant method if there is no need for a null
return.
Get a deep copy of revision, which is a private property available only when the Wikitext instance was initialized by newFromTitle.
null
if the instance doesn't have the relevant property, meaning that it wasn't initialized by newFromTitle.
Get a deep copy of sections, which is a private property available only when parseSections has
been called at least once. Note that parseSections returns a (filtered) deep copy of sections
on a non-first call, so simply call the relevant method if there is no need for a null
return.
Get a deep copy of tags, which is a private property available only when parseTags has
been called at least once. Note that parseTags returns a (filtered) deep copy of tags
on a non-first call, so simply call the relevant method if there is no need for a null
return.
Private
inParse {{{parameter}}}s in the wikitext.
Optional
config: ParseParametersConfigParse <tag>s in the wikitext.
Optional
config: ParseTagsConfigParse {{template}}s in the wikitext.
Optional
config: ParseTemplatesConfigStatic
fetchFetch the wikitext of a page with additional information on the current revision.
false
if the page doesn't exist, null
if the API request failed.
mediawiki.api
Static
newInitialize a new Wikitext instance by fetching the content of a page.
false
if the page doesn't exist, null
if the content of the page failed to be fetched.
mediawiki.api
Static
readFetch the wikitext of a page. If additional revision information should be included, use fetch.
false
if the page doesn't exist, null
if the API request failed.
mediawiki.api
Generated using TypeDoc
The Wikitext class with methods to manipulate wikitext.