import { RichTextEditorOptions } from './rich-text-editor.types';
/**
* Headless rich-text editor. Wires a toolbar of `document.execCommand` actions
* to a `contenteditable` region, reflects each toggle command's state on the
* toolbar buttons (`aria-pressed` + `data-active`) and emits change/command
* events. It applies no visual styles.
*
* > `document.execCommand` is deprecated but remains the most broadly supported
* > way to do inline formatting with native undo. Swap the engine by listening
* > to `richtexteditor:command` if you need a custom model.
*
* Markup:
* ```html
*
* ```
*/
export declare class RichTextEditor {
private readonly root;
private readonly toolbar;
private readonly content;
private readonly buttons;
private readonly getLinkUrl;
private cleanups;
constructor(root: HTMLElement, options?: RichTextEditorOptions);
private init;
private selectionInside;
private runButton;
private exec;
private updateToolbar;
private updateEmpty;
private emitChange;
/** Run a formatting command (optionally with a value), then sync UI + emit. */
format(command: string, value?: string): void;
/** Current HTML of the editable region. */
getHTML(): string;
/** Replace the editable region's HTML and emit a change. */
setHTML(html: string): void;
/** Focus the editable region. */
focus(): void;
/** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */
on(event: string, handler: (event: E) => void): () => void;
destroy(): void;
}