O.text()

Constructs a object implementing the Text interface.

function O.text(typecode, text)

typecode is one of the constants defined in Text types.

text is the raw string representation for that type of text.

Example

var text = O.text(O.T_TEXT_PARAGRAPH, "Paragraph one.\nParagraph two.");