contenido
Version:
Contenido is a library with a set of tools to help you create your own rich text editor on top of draft-js without thinking about how to handle things.
9 lines (8 loc) • 498 B
TypeScript
import type { Dispatch, RefObject, SetStateAction } from 'react';
import type { Editor as DraftEditor, EditorState } from 'draft-js';
export type State = EditorState;
export type StateHandler = Dispatch<SetStateAction<State>> | ((state: State) => void);
export type EditorRef = RefObject<DraftEditor> | null;
export type SyntheticClipboardEvent = React.ClipboardEvent<{}>;
export type SyntheticKeyboardEvent = React.KeyboardEvent<{}>;
export type SyntheticEvent = React.SyntheticEvent<{}>;