Javascript: TableBaseCollection.removeAtInputPosition Method
Description
Removes the table at the current input position.
Syntax
<void> TableBaseCollection.removeAtInputPosition([<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Optional. Receives whether the table could removed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableBaseCollection.removeAtInputPosition in a practical document-editing workflow. It removes the table at the current input position.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function removeAtInputPosition(tableBases) {
tableBases.removeAtInputPosition(
function(result) {
if (result) {
console.log("remove at input position is available.");
} else {
console.warn("remove at input position is not available in the current document state.");
}
},
onTxError
);
}