import { JSONContent } from '@tiptap/react'; export type OnChangeHandler = (params: { content: JSONContent; }) => void; export interface RichTextEditorProps { /** * The content of the editor. * @example { type: "doc", content: [{ type: "paragraph", content: [{ type: "text", text: "Hello!" }] }] } */ content?: JSONContent; /** * The placeholder text to show when the editor is empty. * @default "Write something..." * @example "Write a blog post..." */ placeholder?: string; /** * Callback function that is called when the editor content changes. * @example ({ content }) => console.log(content) */ onChange?: OnChangeHandler; /** * The time to delay in miliseconds before callback for updating the editor content * @default 2000 * @example 5000 */ changeDelay?: number; /** * The maximum time to delay in miliseconds before callback for updating the editor content * @example 5000 * @default 10000 */ maxChangeDelay?: number; /** * Callback function that is called when an image is uploaded. * @param file * @returns */ onImageUpload?: (file: File) => Promise<{ src: string; caption?: string; }>; /** * Whether the editor is editable or not. * @default true * @example false */ editable?: boolean; /** * Additional class name for the container. * @example "my-custom-class" * @default "" */ containerClassName?: string; } export declare const RichTextEditor: ({ onChange, maxChangeDelay, changeDelay, content, placeholder, onImageUpload, editable, containerClassName, }: RichTextEditorProps) => import("react/jsx-runtime").JSX.Element;