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.
15 lines (11 loc) • 508 B
text/typescript
// Types
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<{}>;