TableCellCollection Object
Description
Syntax
TableCellCollectionExamples
The following example demonstrates TableCellCollection in a practical document-editing workflow. It contains all cells of a table.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectTableCellCollection(tableCells) {
tableCells.getCanRemove(
function(result) {
if (result) {
console.log("get can remove is available.");
} else {
console.warn("get can remove is not available in the current document state.");
}
},
onTxError
);
}Members
Methods
| Method | Description |
|---|---|
| elementAt | Returns the element at a specified index in the collection. (Inherited from Collection.) |
| forEach | Executes a callback function for each element. (Inherited from Collection.) |
| getCanRemove | Gets a value indicating whether table cells can be removed. Table cells can be removed, if either the current text input position is in a table, or if a part of a table is selected. |
| getCount | Gets the number of elements contained in the collection. (Inherited from Collection.) |
| getItem | Gets the cell with the specified row and column number. |
| getItemAtInputPosition | Gets table's cell at the current input position. |
| remove | Removes the table cell at the current text input position or all selected table cells when a text selection exists. |