Class

TextControlContext

TextControlContext()

Constructor

# new TextControlContext()

View Source TextControlContext.js, line 11

Methods

# async init(componentSettings, jsResourceFilePathopt) → {Promise.<void>}

Initializes the document editor
Parameters:
Name Type Attributes Default Description
componentSettings TXTextControl.ComponentSettings
jsResourceFilePath string <optional>
"/GetResource?name=tx-document-editor.min.js"

View Source TextControlContext.js, line 101

Promise.<void>

# async isReady() → {Promise.<void>}

waits until TXTextControlLoaded

View Source TextControlContext.js, line 125

Promise.<void>

# async load(streamType:StreamType, base64Data, loadSettings:LoadSettingsopt) → {Promise.<any>}

Loads text in a certain format. The complete contents of the web editor are replaced.
Parameters:
Name Type Attributes Description
streamType:StreamType any
base64Data string
loadSettings:LoadSettings any <optional>

View Source TextControlContext.js, line 47

LoadDocumentCallbackData
Promise.<any>

# async save(streamType:StreamType, saveSettings:SaveSettingsopt) → {Promise.<any>}

Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
Parameters:
Name Type Attributes Description
streamType:StreamType any
saveSettings:SaveSettings any <optional>

View Source TextControlContext.js, line 62

SaveDocumentResult
Promise.<any>

# async setInputPositionByTextPosition(textPosition, textFieldPosition:) → {Promise.<void>}

Sets a new input position from a text position.
Parameters:
Name Type Description
textPosition number
textFieldPosition: any TextFieldPosition

View Source TextControlContext.js, line 76

Promise.<void>

# async setRenderMode(value)

Sets the component render mode.
Parameters:
Name Type Description
value TXTextControl.ComponentRenderMode

View Source TextControlContext.js, line 88