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