Class: EMLText

EMLText()

A model that represents the EML 2.2.0 Text module

Constructor

new EMLText()

Source:

Extends

Methods

getParentEML() → {EML211|false}

Climbs up the model heirarchy until it finds the EML model
Inherited From:
Source:
Returns:
- Returns the EML 211 Model or false if not found
Type
EML211 | false

nodeNameMap()

Maps the lower-case EML node names (valid in HTML DOM) to the camel-cased EML node names (valid in EML). Used during parse() and serialize()
Inherited From:
Source:

parse(objectDOM) → {JSON}

Parses the XML objectDOM into a JSON object to be set on the model. If this EMLText element contains markdown, then parse it. Otherwise, use the EMLText 211 parse() method.
Parameters:
Name Type Description
objectDOM Element XML Element to parse
Source:
Returns:
The literal object to be set on the model later
Type
JSON

setText()

Overrides:
Source:

toString() → {string}

Overrides:
Source:
Returns:
Type
string

updateDOM(textType) → {XMLElement}

Makes a copy of the original XML DOM and updates it with the new values from the model
Parameters:
Name Type Description
textType string a string indicating the name for the outer xml element (i.e. content). Used in case there is no exisiting xmlDOM.
Overrides:
Source:
Returns:
Type
XMLElement