Text interface
Text objects are used as values for StoreObject, and the type of text object specifies how the text is formatted in the user interface.
Use render() to render text objects in your templates.
Construction
Use O.text().
Interface
property typecode
Text typecode, as defined in Text types.
function toString(format)
Returns a string representation of the text.
Optional format parameter (string) can be used to return the text in a specific format for certain Text types. The following options are available:
| Constant name | Format option | Description |
O.T_TEXT_DOCUMENT |
plaintext | Return the document with tags removed, and paragraphs/headers separated by new lines |
O.T_IDENTIFIER_TELEPHONE_NUMBER |
dial | Telephone number as it would be dialed without spaces |
O.T_IDENTIFIER_TELEPHONE_NUMBER |
short | Short format readable telephone number |
O.T_IDENTIFIER_TELEPHONE_NUMBER |
export | Clean format for sync and exporting |
function s()
Alias for toString().
function toHTML()
Returns a HTML encoded string representation of the text, formatted appropriately for the text and suitable for outputting directly in generated HTML.