View as Markdown

API reference: @salmonui/rich-text

RichTextContentcomponent

import { RichTextContent } from '@salmonui/rich-text';
function RichTextContent(props: RichTextContentProps): import("react").JSX.Element;

Read-only rendering of rich text content; root class salmon-rich-text-content.

Props: RichTextContentProps

RichTextContent props (7)
NameSignatureDescription
valueoptionalvalue?: string;

Stored HTML (for example a RichTextEditor value). Sanitized before rendering.

blocksoptionalblocks?: readonly Block[];

BlockEditor blocks; rendered through blocksToHtml when value is not given.

embedHostsoptionalembedHosts?: readonly string[];

Hostnames whose iframe embeds are kept (see SanitizeHtmlOptions.embedHosts).

sanitizeoptionalsanitize?: SanitizeHook;

Further sanitizer restriction (see SanitizeHook); keep it stable (module scope or memoized).

classNameoptionalclassName?: string;
styleoptionalstyle?: CSSProperties;
refoptionalref?: Ref<HTMLDivElement>;