Class: JSONExt

ext/JSON~JSONExt()

new JSONExt()

Native Parsoid implementation of the "json" contentmodel.

Native Parsoid implementation of the "json" contentmodel.

Source:

Members

config :Object

...

Methods

fromHTML(env, body, useSelser) → {string}

HTML to JSON.

HTML to JSON.

Parameters:
Name Type Description
env MWParserEnvironment
body Node
useSelser boolean
Source:
Returns:
Type
string

toHTML(env) → {Document}

JSON to HTML.

JSON to HTML. Implementation matches that from includes/content/JsonContent.php in mediawiki core, except that we add some additional classes to distinguish value types.

Parameters:
Name Type Description
env MWParserEnvironment
Source:
Returns:
Type
Document