import React from 'react'; import ReactQuill, { EmitterSource } from "react-quill-new"; import { TextFieldNote } from "./types"; import { Size, States } from "../types"; import 'react-quill-new/dist/quill.snow.css'; export declare const RichTextFieldContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit, HTMLDivElement>, never>> & string; export declare enum RichTextFieldFormats { Background = "background", Bold = "bold", Color = "color", Font = "font", Code = "code", Italic = "italic", Link = "link", Size = "size", Strike = "strike", Script = "script", Underline = "underline", Blockquote = "blockquote", Header = "header", Indent = "indent", List = "list", Align = "align", Direction = "direction", CodeBlock = "code-block", Formula = "formula", Image = "image", Video = "video" } export interface RichTextFieldProps { /** * Optional. The ID of the rich text field. */ id?: string; /** * Optional. The CSS class name of the rich text field. */ className?: string; /** * Optional. The placeholder text to be displayed in the rich text field when it is empty. */ placeholder?: string; /** * Optional. A boolean indicating whether the rich text field is read-only. */ readOnly?: boolean; /** * Optional. A boolean indicating whether the rich text field is disabled. */ disabled?: boolean; /** * Optional. A boolean indicating whether the rich text field is resizable. */ resizable?: boolean; /** * Optional. An object containing the modules to be used by the rich text field. */ modules?: Record; /** * Optional. An array of formats to be used by the rich text field. */ formats?: RichTextFieldFormats[]; /** * Optional. A function to be called when the rich text field gains focus. */ onFocus?(selection: ReactQuill.Range, source: EmitterSource, editor: ReactQuill.UnprivilegedEditor): void; /** * Optional. A function to be called when the rich text field loses focus. */ onBlur?(previousSelection: ReactQuill.Range, source: EmitterSource, editor: ReactQuill.UnprivilegedEditor): void; /** * Optional. A function to be called when a keydown event occurs in the rich text field. */ onKeyDown?: React.EventHandler; /** * Optional. A function to be called when a keypress event occurs in the rich text field. */ onKeyPress?: React.EventHandler; /** * Optional. A function to be called when a keyup event occurs in the rich text field. */ onKeyUp?: React.EventHandler; /** * Required. The current value of the rich text field. */ value: any; /** * Required. A function to be called when the value of the rich text field changes. */ onChange: (value: any) => void; /** * Optional. The validation message to be displayed when the rich text field is in an error state. */ validationMessage?: string; /** * Optional. A note to be displayed below the rich text field. */ note?: TextFieldNote; /** * Optional. The size of the rich text field. Can be 'Small' or 'Medium'. */ size?: Size.Small | Size.Medium; /** * Optional. The state of the rich text field. Can be 'Invalid' or 'Valid'. */ state?: States.Invalid | States.Valid; } export declare const RichTextField: React.ForwardRefExoticComponent>;