prosekit/extensions/table
InsertTableOptions
col: number
header: boolean
row: number
SelectTableCellOptions
pos?: number
A hit position of the table cell to select from. By default, the selection anchor will be used.
SelectTableColumnOptions
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.
SelectTableOptions
pos?: number
A hit position of the table to select from. By default, the selection anchor will be used.
SelectTableRowOptions
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.
defineTable
function defineTable(): TableExtension
defineTableCommands
function defineTableCommands(): TableCommandsExtension
Adds commands for working with table
nodes.
defineTableHeaderCellSpec
function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension
defineTablePlugins
function defineTablePlugins(): PlainExtension
exitTable
When the selection is in a table node, create a default block after the table table, and move the cursor there.
function exitTable(state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView): boolean
insertTable
function insertTable(options: InsertTableOptions): Command
Insert a table node with the given number of rows and columns, and optionally a header row.
isCellSelection
function isCellSelection(value: unknown): value is CellSelection
Checks if the given object is a CellSelection
instance.
selectTable
function selectTable(options?: SelectTableOptions): Command
selectTableCell
function selectTableCell(options?: SelectTableCellOptions): Command
selectTableColumn
function selectTableColumn(options?: SelectTableColumnOptions): Command
selectTableRow
function selectTableRow(options?: SelectTableRowOptions): Command