Javascript: TXTextControl.setText Method
Description
Sets the control's text.
Syntax
<void> TXTextControl.setText(<boolean> text, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| text | Specifies the control's text. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.setText in a practical document-editing workflow. It sets the control's text.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setText(
true,
function() {
console.log("set text completed.");
},
onTxError
);