. Set ONCE as the contentEditable innerHTML
* (uncontrolled) — never re-set on keystroke (would kill the caret + Korean IME).
*
* Each paragraph gets its OWN (split on "\n", whether a standalone join run or an embedded "\n"), so
* serializeEditor's "one structural trailing \n" assumption is ALWAYS correct (deterministic no-op / newline
* handling — 교훈 2). `paras` (one entry per paragraph, same order as the runs) is OPTIONAL indent/alignment
* decoration; when omitted the divs carry no indent (the web wasm adapter has no per-paragraph indent yet). */
export declare function runsToHtml(runs: RunSpec[], scale: number, paras?: ParaIndent[]): string;
/** The EFFECTIVE char style at the current selection (caret/anchor) inside a contentEditable — for
* live-syncing a format ribbon as the caret moves over differently-styled text. Returns null when there's
* no selection or it isn't inside `root`. */
export declare function readCaretStyle(root: HTMLElement, scale: number): {
bold: boolean;
italic: boolean;
underline: boolean;
strike: boolean;
size_pt: number;
color: string | null;
} | null;
/** Walk the contentEditable DOM → RunSpec[]: each text segment's computed style → a run; adjacent same-style
* segments merge;
and browser block boundaries (div/p on Enter) → "\n" in the run text; → space.
* Empty editor → one empty run. */
export declare function serializeEditor(root: HTMLElement, scale: number): RunSpec[];
/** The plain text of the runs (for the ribbon state / a text baseline). */
export declare function runsText(runs: RunSpec[]): string;
/** Deep-equal two run lists (text + style) — the commit no-op check building block. */
export declare function runsEqual(a: RunSpec[], b: RunSpec[]): boolean;
/** Canonicalize a run list to the exact shape serializeEditor would emit, so the no-op compare is robust to
* (a) runsAt's standalone "\n" paragraph-join runs — a
/block boundary attaches to the PRECEDING span on
* round-trip, folding its (default) style away — and (b) all-empty blocks, which runsToHtml renders as one
* styleless empty run. Without this, opening a multi-paragraph or empty cell and clicking away (zero edits)
* failed runsEqual and fired a spurious write + undo unit. */
export declare function canonRuns(runs: RunSpec[]): RunSpec[];
/** The commit no-op check: did the edit change nothing? Compares canonicalized forms so the synthetic
* paragraph-join "\n" runs + all-empty blocks don't read as a spurious change (미접촉 셀 재커밋 = no-op). */
export declare function runsUnchanged(serialized: RunSpec[], baseline: RunSpec[]): boolean;
export declare function saveInlineSelection(): void;
/** Apply a format LIVE to the inline editor's current selection (⌘B/⌘I/⌘U + the ribbon while editing):
* bold/italic/underline/strike/color toggle via execCommand; size/font wrap the selection in a styled span.
* Visible immediately, no SVG repaint — the styled DOM is serialized to runs on commit. execCommand is
* deprecated but is the desktop-verified path (실측: all current engines support bold/italic/underline/
* strikeThrough/foreColor with styleWithCSS); the own SVG is the source of truth on commit. */
export declare function applyLiveStyle(patch: {
bold?: boolean;
italic?: boolean;
underline?: boolean;
strike?: boolean;
sizePt?: number;
font?: string;
color?: string;
}, scale: number): void;
//# sourceMappingURL=richedit.d.ts.map