Rich Text Editor
Tiptap WYSIWYG editor with a formatting toolbar and HTML output.
Import
tsx
import { RichTextEditor } from "@cooud-ui/ui";
bash
npx cooud-ui add rich-text-editor
Examples
API Reference
Generated from the component's exported types.
RichTextEditorProps
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled HTML value. When provided, external changes are synced into the editor. |
defaultValue | string | — | Uncontrolled initial HTML content. Ignored once the editor has mounted. |
onChange | (html: string) => void | — | Called with the serialized HTML whenever the document changes. |
placeholder | string | — | Placeholder shown while the document is empty. |
editable | boolean | true | Whether the content is editable. Defaults to `true`. |
className | string | — | Extra classes for the editor shell (toolbar + content wrapper). |
aria-label | string | — | Accessible label for the editable region. |