/** * useEditorSetup - Creates the Slate editor: inline links, markdown autoformat, * empty list-item Enter, and stale selection recovery on onChange. */ import { Editor } from 'slate'; /** Returns true if the editor contains a single empty paragraph. */ export declare function isEditorEmpty(e: Editor): boolean; /** Apply defaultTextStyle marks so the first typed character inherits them. */ export declare function applyInitialMarks(e: Editor, style: { color?: string; backgroundColor?: string; fontSize?: string; fontFamily?: string; bold?: boolean; italic?: boolean; underline?: boolean; strikethrough?: boolean; }): void; interface DefaultTextStyleRef { current: { color?: string; backgroundColor?: string; fontSize?: string; fontFamily?: string; bold?: boolean; italic?: boolean; underline?: boolean; strikethrough?: boolean; }; } /** * Route plain-text insertion through editor.insertText instead of slate-react's native fast path, * which calls toDOMPoint while the DOM<->node map may be stale (crashing "Cannot resolve a DOM node"). * Returning true makes slate-react skip its native path. IME input uses a different inputType, left untouched. */ export declare function handleTextInsert(e: Editor, event: InputEvent): boolean; export declare function useEditorSetup(defaultTextStyleRef: DefaultTextStyleRef): Editor; export declare function useInitialMarks(editor: Editor, isEditMode: boolean, defaultTextStyle: DefaultTextStyleRef['current']): void; export {}; //# sourceMappingURL=useEditorSetup.d.ts.map