Trevixal API
    Preparing search index...

    Interface TableCommands

    Table commands the UI drives, supplied by the host so @trevixal/ui does not depend on @trevixal/extension-table. Pass tableUICommands() from that package, or your own equivalents.

    interface TableCommands {
        addColumnAfter?: Command;
        addColumnBefore?: Command;
        addRowAfter?: Command;
        addRowBefore?: Command;
        clearSizing?: Command;
        convertTableToText?: Command;
        convertTextToTable?: Command;
        csvAtSelection?: (state: EditorState) => string | null;
        deleteColumn?: Command;
        deleteRow?: Command;
        deleteTable?: Command;
        distributeColumns?: Command;
        insertTable: (rows: number, cols: number) => Command;
        insertTableFromCSV?: (csv: string) => Command;
        mergeCells?: Command;
        setCellAlign?: (align: "right" | "center" | "left" | null) => Command;
        setCellBackground?: (color: string | null) => Command;
        setTableBorderColor?: (color: string | null) => Command;
        setTableBorders?: (
            borders: "none" | "all" | "outer" | "horizontal" | null,
        ) => Command;
        sortAscending?: Command;
        sortDescending?: Command;
        splitCell?: Command;
        toggleHeaderRow?: Command;
    }
    Index
    addColumnAfter?: Command
    addColumnBefore?: Command
    addRowAfter?: Command
    addRowBefore?: Command
    clearSizing?: Command
    convertTableToText?: Command
    convertTextToTable?: Command
    csvAtSelection?: (state: EditorState) => string | null

    Reads the table at the selection as CSV; not a command, a reader.

    deleteColumn?: Command
    deleteRow?: Command
    deleteTable?: Command
    distributeColumns?: Command
    insertTable: (rows: number, cols: number) => Command
    insertTableFromCSV?: (csv: string) => Command
    mergeCells?: Command
    setCellAlign?: (align: "right" | "center" | "left" | null) => Command
    setCellBackground?: (color: string | null) => Command
    setTableBorderColor?: (color: string | null) => Command
    setTableBorders?: (
        borders: "none" | "all" | "outer" | "horizontal" | null,
    ) => Command
    sortAscending?: Command
    sortDescending?: Command
    splitCell?: Command
    toggleHeaderRow?: Command