react-latex-editor
Version:
A professional React rich text editor with mathematical equation support, built on TipTap with MathLive integration. Production-ready with TypeScript support, accessibility features, and industrial-grade error handling.
38 lines • 1.04 kB
TypeScript
import { Editor as TiptapEditor } from '@tiptap/react';
/**
* Hook to track editor state and statistics
*/
export declare function useEditorState(editor: TiptapEditor | null): {
isEmpty: boolean;
isFocused: boolean;
characterCount: number;
wordCount: number;
canUndo: boolean;
canRedo: boolean;
};
/**
* Hook to manage editor content with auto-save
*/
export declare function useEditorAutoSave(editor: TiptapEditor | null, onSave: (content: string) => void | Promise<void>, delay?: number): {
isSaving: boolean;
lastSaved: Date | null;
};
/**
* Hook to handle editor selection
*/
export declare function useEditorSelection(editor: TiptapEditor | null): {
getSelectedText: () => string;
from: number;
to: number;
empty: boolean;
};
/**
* Hook for undo/redo history management
*/
export declare function useEditorHistory(editor: TiptapEditor | null): {
canUndo: boolean;
canRedo: boolean;
undo: () => void;
redo: () => void;
};
//# sourceMappingURL=useEditorState.d.ts.map