TableCollection Class
A collection of the Table objects.
#Declaration
export class TableCollection extends TableBaseCollection<Table>
#Methods
#create(position, columnCount, rowCount) Method
Creates a new Table object with the specified settings and adds it to the collection.
#Declaration
create(
position: number,
columnCount: number,
rowCount: number
): Table
#Parameters
Name | Type | Description |
---|---|---|
position | number | The table position. |
column |
number | The number of columns in the table. |
row |
number | The number of rows in the table. |
#Returns
Type | Description |
---|---|
Table | The newly created table. |
#Remarks
#find(position) Method
Returns a list of tables that traverse the specified position or interval.
#Declaration
find(
position: number | IInterval
): Table[]
#Parameters
Name | Type | Description |
---|---|---|
position | number | IInterval | A document position or interval. |
#Returns
Type | Description |
---|---|
Table[] | A list of tables. |
#Remarks
var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var tables = subDocument.tables.find(position);
for(var i = tables.length - 1, table; table = tables[i]; i--)
table.delete();