Skip to content
Rich Content

RichTextEditor

client175.25 kB
/editorRichTextEditorProps

Preview

Props

17
PropTypeDefault

className

string

defaultValue

string""

description

ReactNode

disabled

booleanfalse

error

string | boolean

field

NebulaField<string>

label

ReactNode

labels

Partial<RichTextLabels>

maxHeight

number

minRows

number6

onChange

((html: string) => void)

placeholder

string

readOnly

booleanfalse

required

booleanfalse

toolbar

readonly RichTextGroup[]the five rows of the full group, exported as `DEFAULT_TOOLBAR`

value

string

withToolbar

booleantrue

Slot props

10

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

bodyProps

Wrapper for the control.

BoxSlotProps

contentProps

The editable area. It carries `data-empty`, which is what makes the placeholder show.

BoxSlotProps

descriptionProps

Help text below the label. Only rendered with `description`.

TextSlotProps

errorProps

Configures the `FieldError`. With `errorDisplay="tooltip"` it spreads whole; with `"text"` there is no `FieldError` to configure — it is a `Text` with `role="alert"` — and only `className` is honoured.

Omit<FieldErrorProps, "children">

headerProps

The label and description row. Not rendered when the field has neither.

BoxSlotProps

labelProps

The field label. It lands on the `<label>`, which already carries the control `htmlFor`.

TextSlotProps

placeholderProps

The placeholder. Only rendered with an empty editor and a `placeholder`.

TextSlotProps

requiredProps

The required asterisk, which lives inside the label. Only rendered with `required`.

BoxSlotProps

toolbarGroupProps

Every group in the bar. It spreads over ALL of them; the groups come from `toolbar`.

BoxSlotProps

toolbarProps

The action bar. Only with `withToolbar`.

BoxSlotProps

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128