Files
labelmain-demo/components/label/components/EditorContainer.md
2026-02-03 18:05:47 +08:00

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.