Javascript: TableCellCollection.getItemAtInputPosition Method
Description
Gets table's cell at the current input position.
Syntax
<void> TableCellCollection.getItemAtInputPosition(<RequestTableCellCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the table cell. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableCellCollection.getItemAtInputPosition in a practical document-editing workflow. It gets table's cell at the current input position.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectItemAtInputPosition(tableCells) {
tableCells.getItemAtInputPosition(
function(cell) {
if (!cell) {
console.warn("No table cell was returned.");
return;
}
console.log("get item at input position result:", cell);
},
onTxError
);
}