import { Observable, ObservableMaybe } from 'woby'; export type SelectionState = { startContainerPath: number[]; startOffset: number; endContainerPath: number[]; endOffset: number; isCollapsed: boolean; }; /** * Get selection state relative to a root node (default: document.body). */ export declare function getSelection(root?: Node): SelectionState | null; /** * Restore a previously saved selection state. */ export declare function restoreSelection(state: SelectionState, root?: Node): void; export declare const range: import("woby").ObservableReadonly; export declare function cloneAttributes(target: HTMLElement, source: HTMLElement): void; export declare const expandRange: () => Range; export declare const sanitizeElement: (element: HTMLElement) => void; export declare const selectText: (element: HTMLElement, range: Range, t: string) => void; export declare const applyStyle: (styleSetter: (element: HTMLElement) => void) => void; export declare const isTags: (node: HTMLElement, ...args: string[]) => boolean; export declare const getSelectedText: (currentRange: Range | undefined | null) => string | null; export declare const replaceSelectedText: (currentRange: Range | undefined | null, newText: string) => void; export declare const getElementsInRange: (range: Range, container: ObservableMaybe) => HTMLElement[]; export declare const getSelectedTableCells: (range: Range, container: Observable) => HTMLTableCellElement[]; export declare function focusNextTableCell(reverse?: boolean): void; export declare const findBlockParent: (element: HTMLElement, editor: Observable) => HTMLElement | null; type FormatOptionType = { label: string; tag: string; hotkey?: string; class?: string; }; export declare const convertToSemanticElement: (elementToConvert: HTMLElement, targetTag: string, editorRoot: HTMLDivElement, formatOptionsArray: FormatOptionType[]) => void; export {}; //# sourceMappingURL=utils.d.ts.map