Forms
Rich Text Editor
Toolbar-based contentEditable rich text editor supporting bold, italic, underline, strikethrough, and list formatting.
Quick Preview
Installation
# No extra dependencies
// Copy component fromsrc/components/forms/RichTextEditor.tsx
Usage
import RichTextEditor from '@/components/forms/RichTextEditor'<RichTextEditorlabel="Article Body"placeholder="Start writing..."onChange={(html) => setContent(html)}/>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Label above the editor |
value | string | - | Initial HTML content |
onChange | (html: string) => void | - | Called with HTML string on input |
placeholder | string | "Start typing..." | Placeholder text |
className | string | - | Additional CSS classes |