interface RichTextFieldProps

Passed to RichTextField by a form that holds a string field.

Type Parameters

T extends FieldValues

Properties

name: Path<T>
optional
label: string
optional
placeholder: string
optional
rows: number
optional
maxLength: number

Counted in the editor and checked on submit, with a message. It overrides a maxLength in rules.

optional
autoResize: boolean
optional
disabled: boolean
optional
rules: RegisterOptions<T, Path<T>>
optional
editorRef: React.Ref<TextEditorHandle>

The editor's ref, for a caller that focuses it.

optional
onSubmit: () => void

Called on Ctrl/Cmd+Enter.

Usage

import { type RichTextFieldProps } from "src/components/form/RichTextField.tsx";