MiHCM
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.

PropTypeDefaultDescriptionSince
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
placeholderstring'Start typing...'Placeholder text shown when editor is empty.0.5.0
onChange(editorState: EditorState, editor: LexicalEditor) => voidCalled on every change with the Lexical EditorState and LexicalEditor instance.0.5.0
readOnlybooleanfalseDisables editing and hides the toolbar.0.5.0
minHeightstring'150px'Minimum height of the editor area.0.5.0

Import

import { RichTextEditor } from '@mihcm/ui/RichTextEditor';