Javascript: TableColumnCollection.add Method
Description
Adds a new table column at the current text input position.
Syntax
<void> TableColumnCollection.add(<TableAddPosition> tableAddPosition, [<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| tableAddPosition | Specifies where to add the column in the collection. |
| callback | Optional. Receives whether the table could added. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableColumnCollection.add in a practical document-editing workflow. It adds a new table column at the current text input position.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function add(tableColumns) {
tableColumns.add(
TXTextControl.TableAddPosition.After,
function(result) {
if (result) {
console.log("add is available.");
} else {
console.warn("add is not available in the current document state.");
}
},
onTxError
);
}