import { Editor } from '@tiptap/react'; import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core'; import { RichTextEditorLabels } from './labels'; import { RichTextEditorContent } from './RichTextEditorContent/RichTextEditorContent'; import * as controls from './RichTextEditorControl'; import { RichTextEditorControl } from './RichTextEditorControl/RichTextEditorControl'; import { RichTextEditorControlsGroup } from './RichTextEditorControlsGroup/RichTextEditorControlsGroup'; import { RichTextEditorToolbar } from './RichTextEditorToolbar/RichTextEditorToolbar'; export type RichTextEditorVariant = 'default' | 'subtle'; export type RichTextEditorStylesNames = 'linkEditorSave' | 'linkEditorDropdown' | 'root' | 'content' | 'typographyStylesProvider' | 'control' | 'controlIcon' | 'controlsGroup' | 'toolbar' | 'linkEditor' | 'linkEditorInput' | 'linkEditorExternalControl'; export interface RichTextEditorProps extends BoxProps, StylesApiProps, ElementProps<'div'> { /** Tiptap editor instance */ editor: Editor | null; /** Determines whether code highlight styles should be added, `true` by default */ withCodeHighlightStyles?: boolean; /** Determines whether typography styles should be added, `true` by default */ withTypographyStyles?: boolean; /** Labels that are used in controls */ labels?: Partial; /** Child editor components */ children: React.ReactNode; } export type RichTextEditorFactory = Factory<{ props: RichTextEditorProps; ref: HTMLDivElement; stylesNames: RichTextEditorStylesNames; variant: RichTextEditorVariant; staticComponents: { Content: typeof RichTextEditorContent; Control: typeof RichTextEditorControl; Toolbar: typeof RichTextEditorToolbar; ControlsGroup: typeof RichTextEditorControlsGroup; Bold: typeof controls.BoldControl; Italic: typeof controls.ItalicControl; Strikethrough: typeof controls.StrikeThroughControl; Underline: typeof controls.UnderlineControl; ClearFormatting: typeof controls.ClearFormattingControl; H1: typeof controls.H1Control; H2: typeof controls.H2Control; H3: typeof controls.H3Control; H4: typeof controls.H4Control; H5: typeof controls.H5Control; H6: typeof controls.H6Control; BulletList: typeof controls.BulletListControl; OrderedList: typeof controls.OrderedListControl; Link: typeof controls.RichTextEditorLinkControl; Unlink: typeof controls.UnlinkControl; Blockquote: typeof controls.BlockquoteControl; AlignLeft: typeof controls.AlignLeftControl; AlignRight: typeof controls.AlignRightControl; AlignCenter: typeof controls.AlignCenterControl; AlignJustify: typeof controls.AlignJustifyControl; Superscript: typeof controls.SuperscriptControl; Subscript: typeof controls.SubscriptControl; Code: typeof controls.CodeControl; CodeBlock: typeof controls.CodeBlockControl; ColorPicker: typeof controls.RichTextEditorColorPickerControl; Color: typeof controls.RichTextEditorColorControl; Highlight: typeof controls.HighlightControl; Hr: typeof controls.HrControl; UnsetColor: typeof controls.UnsetColorControl; Undo: typeof controls.UndoControl; Redo: typeof controls.RedoControl; TaskList: typeof controls.TaskListControl; TaskListSink: typeof controls.TaskListSinkControl; TaskListLift: typeof controls.TaskListLiftControl; }; }>; export declare const RichTextEditor: import("@mantine/core").MantineComponent<{ props: RichTextEditorProps; ref: HTMLDivElement; stylesNames: RichTextEditorStylesNames; variant: RichTextEditorVariant; staticComponents: { Content: typeof RichTextEditorContent; Control: typeof RichTextEditorControl; Toolbar: typeof RichTextEditorToolbar; ControlsGroup: typeof RichTextEditorControlsGroup; Bold: typeof controls.BoldControl; Italic: typeof controls.ItalicControl; Strikethrough: typeof controls.StrikeThroughControl; Underline: typeof controls.UnderlineControl; ClearFormatting: typeof controls.ClearFormattingControl; H1: typeof controls.H1Control; H2: typeof controls.H2Control; H3: typeof controls.H3Control; H4: typeof controls.H4Control; H5: typeof controls.H5Control; H6: typeof controls.H6Control; BulletList: typeof controls.BulletListControl; OrderedList: typeof controls.OrderedListControl; Link: typeof controls.RichTextEditorLinkControl; Unlink: typeof controls.UnlinkControl; Blockquote: typeof controls.BlockquoteControl; AlignLeft: typeof controls.AlignLeftControl; AlignRight: typeof controls.AlignRightControl; AlignCenter: typeof controls.AlignCenterControl; AlignJustify: typeof controls.AlignJustifyControl; Superscript: typeof controls.SuperscriptControl; Subscript: typeof controls.SubscriptControl; Code: typeof controls.CodeControl; CodeBlock: typeof controls.CodeBlockControl; ColorPicker: typeof controls.RichTextEditorColorPickerControl; Color: typeof controls.RichTextEditorColorControl; Highlight: typeof controls.HighlightControl; Hr: typeof controls.HrControl; UnsetColor: typeof controls.UnsetColorControl; Undo: typeof controls.UndoControl; Redo: typeof controls.RedoControl; TaskList: typeof controls.TaskListControl; TaskListSink: typeof controls.TaskListSinkControl; TaskListLift: typeof controls.TaskListLiftControl; }; }>;