Skip to content

Type Editor


Type Editor / @type-editor/tables / commands/delete-table / deleteTable

Function: deleteTable()

ts
function deleteTable(state, dispatch?): boolean;

Defined in: tables/src/commands/delete-table.ts:15

Deletes the table containing the current selection.

Traverses up the document structure to find and delete the enclosing table.

Parameters

ParameterTypeDescription
statePmEditorStateThe current editor state
dispatch?DispatchFunctionOptional dispatch function to execute the command

Returns

boolean

True if a table was found and deleted, false otherwise