export type CommandHandler = (editor: RayEditorInstance, value?: string) => void; export type EventHandler = (data?: unknown) => boolean | void; export interface ButtonConfig { name: string; icon: string; tooltip?: string; action: (editor: RayEditorInstance) => void; isActive?: (editor: RayEditorInstance) => boolean; } export interface SlashCommandConfig { name: string; icon: string; description?: string; action: (editor: RayEditorInstance) => void; } export interface RayEditorInstance { getContent(): string; setContent(html: string): void; registerCommand(name: string, handler: CommandHandler): void; execCommand(name: string, value?: string): void; addButton(config: ButtonConfig): void; removeButton(name: string): void; registerSlashCommand(cmd: SlashCommandConfig): void; on(event: string, handler: EventHandler): void; off(event: string, handler: EventHandler): void; emit(event: string, data?: unknown): void; readonly editorElement: HTMLElement; readonly toolbarElement: HTMLElement; destroy(): void; setReadOnly(readOnly: boolean): void; setTheme(theme: 'light' | 'dark'): void; } export interface RayPlugin { name: string; version?: string; install(editor: RayEditorInstance): void; destroy?(): void; } //# sourceMappingURL=plugin.d.ts.map