Rich Text
RichTextDisplay
Standalone read-only renderer for RichText values.
RichTextDisplay renders RichText domain values as read-only formatted content. It creates its own Plate editor internally -- no RichEditor.Root wrapper needed.
import { RichTextDisplay } from '@workspace/rich-text/components/rich-text-display';Usage
<RichTextDisplay value={richText} />
// With custom config for suit display mode:
<RichTextDisplay config={{ mode: 'petit-bridge' }} value={richText} />
// With custom class:
<RichTextDisplay className="text-sm" value={richText} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | RichText | required | Content to render |
config | RichEditorConfig | {} | Plugin config (mode, lists) |
className | string | — | Additional CSS class |
Behavior
- Returns
nullwhenvalueis empty ([]) valueis reactive -- re-renders when it changes (unlikeRichEditor.Root.defaultValue)- Suit symbols render with color classes (
text-suit-spade,text-suit-heart, etc.) - Bold and italic formatting is preserved