Class: EMLText

EMLText()

A model that represents the EML 2.2.0 Text module

Constructor

new EMLText()

Source:

Methods

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()

Source:

toString() → {string}

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.
Source:
Returns:
Type
XMLElement