import React from 'react'; import Editor from 'react-quill'; import type { Delta, Sources } from 'quill'; import 'quill-mention'; import { DefaultProps, Selectors, MantineNumberSize } from '@mantine/core'; import { ToolbarStylesNames } from '../Toolbar/Toolbar'; import { DEFAULT_CONTROLS } from './default-control'; import useStyles from './RichTextEditor.styles'; import { DEFAULT_LABELS, RichTextEditorLabels } from './default-labels'; import { ToolbarControl } from '../Toolbar/controls'; export type RichTextEditorStylesNames = ToolbarStylesNames | Selectors; export type { RichTextEditorLabels }; export { DEFAULT_LABELS, DEFAULT_CONTROLS }; export interface RichTextEditorProps extends DefaultProps, Omit, 'onChange' | 'defaultValue'> { /** HTML content, value not forced as quill works in uncontrolled mode */ value?: string | Delta; /** Initial value of input */ defaultValue?: string | Delta; /** Called each time value changes */ onChange?(value: string, delta: Delta, sources: Sources, editor: Editor.UnprivilegedEditor): void; /** Called when image image is inserted in editor */ onImageUpload?(image: File): Promise; /** Labels used in toolbar button titles and assets insertion popovers */ labels?: RichTextEditorLabels; /** Toolbar controls divided into groups */ controls?: ToolbarControl[][]; /** Make toolbar sticky */ sticky?: boolean; /** Quill mentions plugin setting */ mentions?: Record; /** Top toolbar position in any valid css value */ stickyOffset?: number | string; /** Radius from theme.radius, or number to set border-radius in px */ radius?: MantineNumberSize; /** Make quill editor read only */ readOnly?: boolean; /** Extra modules for react-quill */ modules?: Record; /** List of formats that should be supported by the editor */ formats?: string[]; } export declare const RichTextEditor: React.ForwardRefExoticComponent>; //# sourceMappingURL=RichTextEditor.d.ts.map