Skip to content

Type Editor


Type Editor / @type-editor/tables / fixtables/fix-table / fixTable

Function: fixTable()

ts
function fixTable(state, table, tablePos, transaction): PmTransaction;

Defined in: tables/src/fixtables/fix-table.ts:22

Fix the given table, if necessary. Will append to the transaction it was given, if non-null, or create a new one if necessary.

Parameters

ParameterTypeDescription
statePmEditorStateThe current editor state
tableNode_2The table node to fix
tablePosnumberThe position of the table in the document
transactionPmTransactionAn optional existing transaction to append fixes to

Returns

PmTransaction

The transaction with fixes applied, or undefined if no fixes were needed