Show:

module:parse

Parse wikitext (or html) to html (or wikitext).

Parse wikitext (or html) to html (or wikitext).

Parameters:
Name Type Attributes Description
obj Object
Properties
Name Type Attributes Description
input string

The string to parse

mode string

The mode to use

parsoidOptions Object

Will be Object.assign'ed to ParsoidConfig

envOptions Object

Will be Object.assign'ed to the env

cacheConfig boolean <optional>

Cache the constructed ParsoidConfig

body_only boolean <optional>

Only return the children (T181657)

oldid Number <optional>
selser Object <optional>
pb Object <optional>
contentmodel string <optional>
outputContentVersion string <optional>
reuseExpansions Object <optional>
pagelanguage string <optional>
variant Object <optional>
cb function <optional>

Optional node-style callback

Source:
Returns:
Type
Promise

Members

(inner) _fromHTML

Transform html to requested content-model

.

Transform html to requested content-model

Source:

(inner) _toHTML

Transform content-model to html (common-case will be wikitext -> html)

.

Transform content-model to html (common-case will be wikitext -> html)

Source:

(inner) configCache

Map of JSON.stringified parsoidOptions to ParsoidConfig

.

Map of JSON.stringified parsoidOptions to ParsoidConfig

Source:

Methods

(inner) _languageConversion(obj, env, html)

...
Parameters:
Name Type Description
obj Object

See below

env MWParserEnvironment
html string
Source: