Class: Fragments:StructuredText

Fragments:StructuredText

new Fragments:StructuredText()

Embodies a structured text fragment
Source:

Methods

asHtml() → {string}

Turns the fragment into a useable HTML version of it. If the native HTML code doesn't suit your design, this function is meant to be overriden.
Source:
Returns:
- basic HTML code for the fragment
Type
string

asText() → {string}

Turns the fragment into a useable text version of it.
Source:
Returns:
- basic text version of the fragment
Type
string

getFirstImage() → {object}

Source:
Returns:
Type
object

getFirstParagraph() → {object}

Source:
Returns:
the first block of type paragraph
Type
object

getParagraph() → {object}

Source:
Returns:
the nth paragraph
Type
object

getParagraphs() → {array}

Source:
Returns:
all paragraphs
Type
array

getTitle() → {object}

Source:
Returns:
the first heading block in the text
Type
object