Javascript: TXTextControl.setInputPositionByPage Method
Description
Sets a new input position from a page, line and column number.
Syntax
<void> TXTextControl.setInputPositionByPage(<number> page, <number> line, <number> column, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| page | Specifies a page number. |
| line | Specifies a line number. |
| column | Specifies a column number. The first column is zero. |
| 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.setInputPositionByPage in a practical document-editing workflow. It sets a new input position from a page, line and column number.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setInputPositionByPage(
1,
1,
3,
function() {
console.log("set input position by page completed.");
},
onTxError
);