Live Table API
Inspect document tables
Move the caret through the sample table. The live model shows its structure and the current cell, then lets you change content, formatting, rows, and columns.
Current contextWaiting for the editor
Move into a table
Table—
Row—
Cell—
Table ID—
Nested level—
Rows—
Columns—
Live table map
Select a cell. Shift-click another cell to select a rectangular range for merging.
No table
Move the caret into a table.
Selected cell
No cell selected
—
Cell content
Width—
Characters—
Fill color—
Vertical align—
Change the structure
Operations use the table and selection at the current input position.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Tables are structured document content
A table contains row, column, and cell collections. Each cell is an addressable text container with its own geometry and formatting, while rows and columns control the larger document structure.
Current table
TXTextControl.tables.getItem
Cell access
Table.cells.getItem / getItemAtInputPosition
Structure
Table.rows / Table.columns
Cell formatting
TableCell.getCellFormat
How it works
TableCollection.getItem returns the table containing the caret. Its rows, columns, and cells properties expose the complete hierarchy without parsing document text.
TableCellCollection.getItemAtInputPosition identifies the current cell. getRow, getColumn, getStart, getWidth, and getText provide its address, geometry, and content. The visual map calls TableCell.select to connect the side panel back to the editor.
TableCell.getCellFormat returns a live TableCellFormat. This demo changes setBackColor and setVerticalAlignment, while TableCell.setText updates the cell's document content.
TableRowCollection.add and TableColumnCollection.add extend the table relative to the current cell. getCanMergeCells is checked before enabling the merge operation for the current selection.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0