/** Formatting marker definitions: format name → wrapper string */ export declare const FORMAT_MARKERS: Record; /** Keyboard shortcut → format name mapping */ export declare const FORMAT_SHORTCUTS: Record; /** Check whether a format type is enabled in the element's formatting attribute. */ export declare function isFormatEnabled(el: HTMLElement, type: string): boolean; /** * Calculate flat text offsets from a Range within a contenteditable root. * Walks the text nodes to compute character positions. */ export declare function getSelectionOffsets(root: HTMLElement, range: Range): { start: number; end: number; } | null; /** * Toggle wrapping markers around selected text. * If the selected text (or the surrounding text) already has the marker, unwrap. Otherwise wrap. */ export declare function toggleMarker(text: string, selectedText: string, start: number, end: number, marker: string, markerLen: number): { text: string; selStart: number; selEnd: number; }; /** Restore a text selection by flat character offsets within a contenteditable root. */ export declare function restoreSelection(root: HTMLElement, start: number, end: number): void; //# sourceMappingURL=formatting.d.ts.map