// Type definitions for @liteeditor/editor export interface LiteEditorConfig { /** CSS selector string or a DOM element (a class selector attaches to all matches). */ selector: string | HTMLElement; /** Space-separated list of plugins, e.g. "link lists table image media". */ plugins?: string; /** Toolbar layout; use "|" to separate button groups. */ toolbar?: string; /** TinyMCE-style menubar. `true` = all menus, or a space-separated subset * like "file edit format". Default: off. */ menubar?: boolean | string; /** Stylesheet URL(s) injected into the editing area so content looks like your site. */ content_css?: string | string[]; /** Raw CSS injected into the editing area (applied after content_css). */ content_style?: string; /** Editor height in pixels. */ height?: number; /** Your LiteEditor API key (from https://liteeditor.com). */ apiKey?: string; /** Override the licensing API base URL (advanced / self-hosted). */ apiBase?: string; /** Override or disable the inline styles baked into saved HTML. */ default_styles?: Record | false; /** Keep class attributes when pasting. */ paste_keep_classes?: boolean; } export interface LiteEditorInstance { readonly id: string; getContent(): string; setContent(html: string): void; execCommand(command: string, value?: unknown): void; destroy(): void; } export interface LiteEditorFactory { readonly version: string; init(config: LiteEditorConfig): LiteEditorFactory; get(ref: string | HTMLElement): LiteEditorInstance | undefined; getAll(selector?: string): LiteEditorInstance[]; getAllInstances(): LiteEditorInstance[]; remove(ref: string | HTMLElement): void; configure(opts: { apiKey?: string; apiBase?: string }): LiteEditorFactory; } declare const liteeditor: LiteEditorFactory | undefined; export default liteeditor; export declare const LiteEditor: (new () => LiteEditorFactory) | undefined;