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