Create a new instance of VTable object using HTML TABLE or TD node
The HTML Table or TD node
Whether table size needs to be normalized
When the table is under a zoomed container, pass in the zoom scale here
Virtual cells
Current column index
Current format of the table
Current row index
The HTML table object
Selected range of cells with the coordinates of the first and last cell selected.
Selected range of cells with the coordinates of the first and last cell selected.
Apply the given table format to this virtual table
Table format to apply
Edit table with given operation.
Table operation
Get a table cell using its row and column index. This function will always return an object even if the given indexes don't exist in table.
The row index
The column index
Loop each table cell and get all the cells that share the same border from one side The result is an array of table cell elements
The position of the border
Get left-hand-side or right-hand-side cells of the border
Example, consider having a 3 by 4 table as below with merged and split cells
| 1 | 4 | 7 | 8 |
| 5 | 9 |
| 3 | 10 |
input => borderPos: the 3rd border, getLeftCells: true output => [4, 5, 3]
input => borderPos: the 3rd border, getLeftCells: false output => [7, 9, 10]
input => borderPos: the 2nd border, getLeftCells: true output => [1]
input => borderPos: the 2nd border, getLeftCells: false output => [4]
Get current HTML table cell object. If the current table cell is a virtual expanded cell, return its root cell
Get the Table Cell in a provided coordinate
row of the cell
column of the cell
Write the virtual table back to DOM tree to represent the change of VTable
Do not reapply table format when write back. Only use this parameter when you are pretty sure there is no format or table structure change during the process.
An object to handle dark background colors, if not passed the cell background color will not be set
Generated using TypeDoc
A virtual table class, represent an HTML table, by expand all merged cells to each separated cells