primitives/@mihcm/ui·v0.21.0·stable
RichTextEditor
Lexical-powered rich text editor with 4 progressive toolbar variants. Web only.
Props
The full prop API for RichTextEditor. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.
| Prop | Type | Default | Description | Since |
|---|---|---|---|---|
variant | 'minimal' | 'default' | 'semi' | 'full' | 'default' | Controls which toolbar features are shown. minimal: Bold/Italic. default: +Underline/Strikethrough/Lists. semi: +Headings/Undo/Code/Link/Indent/Markdown. full: +Alignment/Justify/Table/CheckList/SuperSub/Quote/HR/Clear. | 0.5.0 |
placeholder | string | 'Start typing...' | Placeholder text shown when editor is empty. | 0.5.0 |
onChange | (editorState: EditorState, editor: LexicalEditor) => void | — | Called on every change with the Lexical EditorState and LexicalEditor instance. | 0.5.0 |
readOnly | boolean | false | Disables editing and hides the toolbar. | 0.5.0 |
minHeight | string | '150px' | Minimum height of the editor area. | 0.5.0 |
Import
import { RichTextEditor } from '@mihcm/ui/RichTextEditor';