## API Report File for "@eigenpal/docx-editor-core"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { Command } from 'prosemirror-state';
import { EditorState } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import { Mark } from 'prosemirror-model';
import { MarkType } from 'prosemirror-model';
import { Node as Node_2 } from 'prosemirror-model';
import { Transaction } from 'prosemirror-state';

// @public
export function acceptAllChanges(): Command;

// @public
export function acceptChange(from: number, to: number): Command;

// @public
export function acceptChangeById(revisionId: number): Command;

// @public (undocumented)
export function addColumnLeft(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addColumnRight(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export function addCommentMark(commentId: number): Command;

// @public (undocumented)
export function addRowAbove(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addRowBelow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addTabStop(position: number, alignment?: TabStopAlignment, leader?: TabLeader): Command;

// @public (undocumented)
export const alignCenter: Command;

// @public (undocumented)
export const alignJustify: Command;

// @public (undocumented)
export const alignLeft: Command;

// @public (undocumented)
export const alignRight: Command;

// @public
export type AnchorWrapType = Exclude<WrapType, 'inline'>;

// @public (undocumented)
export function applyStyle(styleId: string, resolvedAttrs?: ResolvedStyleAttrs): Command;

// @public (undocumented)
export function applyTableStyle(styleData: {
    styleId: string;
    tableBorders?: Record<string, unknown>;
    conditionals?: Record<string, unknown>;
    look?: Record<string, boolean>;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function autoFitContents(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public
export type BorderPreset = 'all' | 'outside' | 'inside' | 'none';

// @public (undocumented)
export const clearFontFamily: Command;

// @public (undocumented)
export const clearFontSize: Command;

// @public
export const clearFormatting: Command;

// @public (undocumented)
export const clearHighlight: Command;

// @public (undocumented)
export const clearStyle: Command;

// @public (undocumented)
export const clearTextColor: Command;

// @public
export function createRemoveMarkCommand(markType: MarkType): Command;

// @public
export function createSetMarkCommand(markType: MarkType, attrs?: Record<string, unknown>): Command;

// @public (undocumented)
export function decreaseIndent(amount?: number): Command;

// @public (undocumented)
export const decreaseListLevel: Command;

// @public (undocumented)
export function deleteColumn(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function deleteRow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function deleteTable(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function distributeColumns(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const doubleSpacing: Command;

// @public
export function findHyperlinkRangeAt(state: EditorState, fallbackHref?: string): {
    mark: Mark;
    start: number;
    end: number;
} | null;

// @public
export function findNextChange(state: EditorState, startPos: number): ChangeRange | null;

// @public
export function findPreviousChange(state: EditorState, startPos: number): ChangeRange | null;

// @public (undocumented)
export const generateTOC: Command;

// @public (undocumented)
export function getHyperlinkAttrs(state: EditorState): {
    href: string;
    tooltip?: string;
} | null;

// @public (undocumented)
export function getListInfo(state: EditorState): {
    numId: number;
    ilvl: number;
} | null;

// @public
export function getMarkAttr(state: EditorState, markType: MarkType, attr: string): unknown | null;

// @public (undocumented)
export function getParagraphAlignment(state: EditorState): ParagraphAlignment | null;

// @public (undocumented)
export function getParagraphBidi(state: EditorState): boolean;

// @public (undocumented)
export function getSelectedText(state: EditorState): string;

// @public (undocumented)
export function getSplitCellDialogConfig(state: EditorState): SplitCellDialogConfig | null;

// @public (undocumented)
export function getStyleId(state: EditorState): string | null;

// @public (undocumented)
export function getTableContext(state: EditorState): TableContextInfo;

// @public
export function getWatermarkFromState(state: EditorState): Watermark | null;

// @public
export type ImageLayoutTarget = AnchorWrapType | 'squareLeft' | 'squareRight' | 'inline';

// @public (undocumented)
export function increaseIndent(amount?: number): Command;

// @public (undocumented)
export const increaseListLevel: Command;

// @public
export const INSERT_IMAGE_MAX_WIDTH_PX = 612;

// @public (undocumented)
export function insertHyperlink(text: string, href: string, tooltip?: string): Command;

// @public
export function insertImageFromFile(view: EditorView, file: File, opts?: {
    maxWidth?: number;
    onError?: (error: unknown) => void;
    onInserted?: () => void;
}): void;

// @public
export function insertImageNode(state: EditorState, dispatch: ((tr: Transaction) => void) | undefined, imageNode: Node_2, pos: number): boolean;

// @public
export const insertPageBreak: Command;

// @public
export const insertSectionBreakContinuous: Command;

// @public
export const insertSectionBreakNextPage: Command;

// @public (undocumented)
export function insertTable(rows: number, cols: number): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function isHyperlinkActive(state: EditorState): boolean;

// @public (undocumented)
export function isInList(state: EditorState): boolean;

// @public (undocumented)
export function isInTable(state: EditorState): boolean;

// @public
export function isMarkActive(state: EditorState, markType: MarkType, attrs?: Record<string, unknown>): boolean;

// @public (undocumented)
export function mergeCells(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export const oneAndHalfSpacing: Command;

// @public
export function rejectAllChanges(): Command;

// @public
export function rejectChange(from: number, to: number): Command;

// @public
export function rejectChangeById(revisionId: number): Command;

// @public
export function removeCommentMark(commentId: number): Command;

// @public (undocumented)
export const removeHyperlink: Command;

// @public (undocumented)
export const removeList: Command;

// @public (undocumented)
export function removeTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function removeTabStop(position: number): Command;

// @public (undocumented)
export interface ResolvedStyleAttrs {
    numbering?: NumberingMap | null;
    // (undocumented)
    paragraphFormatting?: ParagraphFormatting;
    // (undocumented)
    runFormatting?: TextFormatting;
}

// @public (undocumented)
export function selectColumn(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function selectRow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function selectTable(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export function setAlignment(alignment: ParagraphAlignment): Command;

// @public (undocumented)
export function setAllTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setCellBorder(side: 'top' | 'bottom' | 'left' | 'right' | 'all', spec: {
    style: string;
    size?: number;
    color?: {
        rgb: string;
    };
} | null, clearOthers?: boolean): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellFillColor(color: string | null): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellMargins(margins: {
    top?: number;
    bottom?: number;
    left?: number;
    right?: number;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellTextDirection(direction: string | null): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellVerticalAlign(align: 'top' | 'center' | 'bottom'): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setFontFamily(fontName: string): Command;

// @public (undocumented)
export function setFontSize(size: number): Command;

// @public (undocumented)
export function setHighlight(color: string): Command;

// @public (undocumented)
export function setHyperlink(href: string, tooltip?: string): Command;

// @public
export function setImageWrapType(pos: number, target: ImageLayoutTarget, opts?: SetImageWrapTypeOptions): Command;

// @public
export interface SetImageWrapTypeOptions {
    // (undocumented)
    initialPositionEmu?: {
        horizontalEmu: number;
        verticalEmu: number;
    };
}

// @public (undocumented)
export function setIndentFirstLine(twips: number, hanging?: boolean): Command;

// @public (undocumented)
export function setIndentLeft(twips: number): Command;

// @public (undocumented)
export function setIndentRight(twips: number): Command;

// @public (undocumented)
export function setInsideTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setLineSpacing(value: number, rule?: LineSpacingRule): Command;

// @public (undocumented)
export const setLtr: Command;

// @public (undocumented)
export function setOutsideTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setRowHeight(height: number | null, rule?: 'auto' | 'atLeast' | 'exact'): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const setRtl: Command;

// @public (undocumented)
export function setSpaceAfter(twips: number): Command;

// @public (undocumented)
export function setSpaceBefore(twips: number): Command;

// @public (undocumented)
export function setTableBorderColor(color: string): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableBorders(preset: BorderPreset, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableBorderWidth(size: number): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableProperties(props: {
    width?: number | null;
    widthType?: string | null;
    justification?: 'left' | 'center' | 'right' | null;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTextColor(attrs: TextColorAttrs): Command;

// @public (undocumented)
export function setUnderlineStyle(style: string, color?: TextColorAttrs): Command;

// @public
export function setWatermark(watermark: Watermark | null): Command;

// @public (undocumented)
export const singleSpacing: Command;

// @public (undocumented)
export function splitActiveTableCell(state: EditorState, dispatch: ((tr: Transaction) => void) | undefined, rows: number, cols: number,
targetRow?: number, targetCol?: number): boolean;

// @public (undocumented)
export function splitCell(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export interface SplitCellDialogConfig {
    capturedCellCol: number;
    capturedCellRow: number;
    // (undocumented)
    initialCols: number;
    // (undocumented)
    initialRows: number;
    // (undocumented)
    minCols: number;
    // (undocumented)
    minRows: number;
}

// @public
export interface TableContextInfo {
    // (undocumented)
    canSplitCell?: boolean;
    cellBackgroundColor?: string;
    cellBorderColor?: ColorValue;
    // (undocumented)
    columnCount?: number;
    // (undocumented)
    columnIndex?: number;
    // (undocumented)
    hasMultiCellSelection?: boolean;
    // (undocumented)
    isInTable: boolean;
    // (undocumented)
    rowCount?: number;
    // (undocumented)
    rowIndex?: number;
    // (undocumented)
    table?: Node_2;
    // (undocumented)
    tablePos?: number;
}

// @public (undocumented)
export const toggleBold: Command;

// @public (undocumented)
export const toggleBulletList: Command;

// @public (undocumented)
export function toggleHeaderRow(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const toggleItalic: Command;

// @public (undocumented)
export function toggleNoWrap(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const toggleNumberedList: Command;

// @public (undocumented)
export const toggleStrike: Command;

// @public (undocumented)
export const toggleSubscript: Command;

// @public (undocumented)
export const toggleSuperscript: Command;

// @public (undocumented)
export const toggleUnderline: Command;

```
