Table authoring service
Create and edit tables through the same public authoring service used by native commands. Operations act on the current table or the explicitly selected rectangular cell region.
Use it for application-owned table commands and inspect selected-cell state before merging or splitting.

Use it in your application
Await insertion before subsequent table operations. A document or selection change can invalidate a pending table request.
Merge only a valid rectangular region belonging to one table. Inspect spans and the visible result after structural edits.
Read-only mode rejects authoring. Export after the command completes to persist the actual accepted table structure.
await editor.TableAuthoringService.InsertTableAsync(2, 2);
var selected = await editor.TableAuthoringService.GetSelectedCellsAsync();
Members
These declarations come from the package's own XML documentation. Await operations and supply cancellation tokens where your application needs them.
DeleteColumnAsync Method
Deletes the selected table column.
Syntax
Task<EditorSnapshot> DeleteColumnAsync(CancellationToken cancellationToken = default)
DeleteRowAsync Method
Deletes the selected table row.
Syntax
Task<EditorSnapshot> DeleteRowAsync(CancellationToken cancellationToken = default)
DeleteTableAsync Method
Deletes the table containing the current selection.
Syntax
Task<EditorSnapshot> DeleteTableAsync(CancellationToken cancellationToken = default)
GetSelectedCellsAsync Method
Reads the copied logical extent and exact owner, or null when no region is selected.
Syntax
Task<TableCellSelection?> GetSelectedCellsAsync(CancellationToken cancellationToken = default)
InsertColumnAsync Method
Inserts a column before or after the selected table column.
Syntax
Task<EditorSnapshot> InsertColumnAsync(InsertPositions position, CancellationToken cancellationToken = default)
InsertRowAsync Method
Inserts a row before or after the selected table row.
Syntax
Task<EditorSnapshot> InsertRowAsync(InsertPositions position, CancellationToken cancellationToken = default)
InsertTableAsync Method
Inserts a table with 1 to 1,000 rows and columns and at most 2,000 logical cells; caller styles are copied before submission.
Syntax
Task<EditorSnapshot> InsertTableAsync(int rows, int columns, IReadOnlyDictionary<string, string>? styles = null, CancellationToken cancellationToken = default)
MergeCellsAsync Method
Merges the selected cell rectangle, or the adjacent right cell when no region is selected, as one undoable edit.
Syntax
Task<EditorSnapshot> MergeCellsAsync(CancellationToken cancellationToken = default)
MergeWithRightCellAsync Method
Merges the selected cell with its adjacent right cell.
Syntax
Task<EditorSnapshot> MergeWithRightCellAsync(CancellationToken cancellationToken = default)
A selected larger region does not change the literal right-neighbor behavior. Both merge routes use the same bounded planner.
SelectCellsAsync Method
Selects a complete logical rectangle in the caret's current table without changing authored HTML or undo history.
Syntax
Task<EditorSnapshot> SelectCellsAsync(int row, int column, int rowCount, int columnCount, CancellationToken cancellationToken = default)
SetCellPropertiesAsync Method
Applies the shared Table Cell Properties model to the selected cell or all cells of its table as one guarded undoable operation.
Syntax
Task<EditorSnapshot> SetCellPropertiesAsync(TableCellDialogState properties, CancellationToken cancellationToken = default)
SetCellStylesAsync Method
Applies validated styles to the selected cell, copying caller data before submission.
Syntax
Task<EditorSnapshot> SetCellStylesAsync(IReadOnlyDictionary<string, string> styles, CancellationToken cancellationToken = default)
SetTablePropertiesAsync Method
Applies the shared Table Properties model to the selected table as one guarded undoable operation, including bounded span-aware resizing.
Syntax
Task<EditorSnapshot> SetTablePropertiesAsync(TableDialogState properties, CancellationToken cancellationToken = default)
Optional fields remove their corresponding properties when disabled. Residual CSS is preserved alongside enabled fields.
SetTableStylesAsync Method
Applies validated styles to the selected table, copying caller data before submission.
Syntax
Task<EditorSnapshot> SetTableStylesAsync(IReadOnlyDictionary<string, string> styles, CancellationToken cancellationToken = default)
SplitCellAsync Method
Splits the selected table cell.
Syntax
Task<EditorSnapshot> SplitCellAsync(CancellationToken cancellationToken = default)