UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

16 lines (15 loc) 612 B
import { HotkeyId, HotkeyItem, ModifierCombination } from "../../types/hotkey"; export type HotkeysEvent = { key?: string; keys: string; modifiers: ModifierCombination; scopes?: string[]; }; export type HotkeyOptions = { enabled?: boolean; preventDefault?: boolean; stopImmediatePropagation?: boolean; stopPropagation?: boolean; }; export declare const registerHotkey: (hotkey: HotkeyItem, callback: (event: KeyboardEvent, handler: HotkeysEvent) => void, options?: HotkeyOptions) => (e: KeyboardEvent) => boolean; export declare const getHotkeyById: (id: HotkeyId) => HotkeyItem;