rich-text-editor
Version:
Rich text editor
16 lines (15 loc) • 577 B
TypeScript
import * as MathQuill from '@digabi/mathquill';
export type MathEditorHandle = {
mq: MathQuill.MathField;
setLatex: (latex: string) => void;
};
export type Props = {
errorText: string;
onOpen?: (handle: MathEditorHandle) => void;
initialLatex?: string | null;
onBlur?: (latex: string, forceCursorPosition?: 'before' | 'after') => void;
onChange?: (latex: string) => void;
onLatexUpdate?: (latex: string) => void;
onEnter: (latex: string) => void;
};
export default function MathEditor(props: Props): import("react/jsx-runtime").JSX.Element;