Skip to content
GitHubDiscord

prosekit/extensions/table

col: number

The number of columns in the table.

header?: boolean

Whether the table has a header row.

false

row: number

The number of rows in the table.


pos?: number

A hit position of the table cell to select from. By default, the selection anchor will be used.


anchor?: number

A hit position of the table cell to select from. By default, the selection anchor will be used.

head?: number

A hit position of the table cell to select to. By default, the selection head will be used.


pos?: number

A hit position of the table to select from. By default, the selection anchor will be used.


anchor?: number

A hit position of the table cell to select from. By default, the selection anchor will be used.

head?: number

A hit position of the table cell to select to. By default, the selection head will be used.

const exitTable: Command

When the selection is in a table node, create a default block after the table table, and move the cursor there.

function defineTable(): TableExtension


function defineTableCommands(): TableCommandsExtension

Adds commands for working with table nodes.


function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension


function defineTablePlugins(): PlainExtension


function insertTable(options: InsertTableOptions): Command

Insert a table node with the given number of rows and columns, and optionally a header row.


function isCellSelection(value: unknown): value is CellSelection

Checks if the given object is a CellSelection instance.


function selectTable(options?: SelectTableOptions): Command


function selectTableCell(options?: SelectTableCellOptions): Command


function selectTableColumn(options?: SelectTableColumnOptions): Command


function selectTableRow(options?: SelectTableRowOptions): Command