RichTextEditor
/editorRichTextEditorPropsPreview
Props
17| Prop | Type | Default |
|---|---|---|
className | string | — |
defaultValue | string | "" |
description | ReactNode | — |
disabled | boolean | false |
error | string | boolean | — |
field | NebulaField<string> | — |
label | ReactNode | — |
labels | Partial<RichTextLabels> | — |
maxHeight | number | — |
minRows | number | 6 |
onChange | ((html: string) => void) | — |
placeholder | string | — |
readOnly | boolean | false |
required | boolean | false |
toolbar | readonly RichTextGroup[] | the five rows of the full group, exported as `DEFAULT_TOOLBAR` |
value | string | — |
withToolbar | boolean | true |
Slot props
10Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
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.