786 B
786 B
EditorContainer
A rich text editor component based on @mantine/tiptap.
Features
- Basic formatting (Bold, Italic, Underline, Strike, Code)
- Headings (H1-H4)
- Lists (Bullet, Ordered)
- Blockquote, Horizontal Rule
- Links
- Image Upload (Data URI)
Usage
import EditorContainer from './EditorContainer';
<EditorContainer
value="<p>Initial content</p>"
onChange={(val) => console.log(val)}
disabled={false}
/>
Props
| Prop | Type | Description |
|---|---|---|
value |
string |
HTML content of the editor. |
onChange |
(value: string) => void |
Callback when content changes. Returns html@1024-text. |
disabled |
boolean |
Whether the editor is read-only. |
color |
string |
Class name for the container border/style. |