MarkdownEditor emits it as the user types, Markdown renders it read-only — so that single string is all you store.
Both rely on Tailwind’s
prose class, so @tailwindcss/typography must be in the plugins array of tailwind.config.ts — without it, headings and lists render unstyled.Editing
content?: string— initial Markdown.onChange?: (markdown: string) => voidfires on every change.editable?: boolean(defaulttrue) — setfalseto hide the toolbar and show read-only content.height?: 'sm' | 'md' | 'lg' | 'dynamic-sm' | 'dynamic-md' | 'dynamic-lg'(default'dynamic-md') — fixed heights, or minimums that grow with content.- Hide individual toolbar buttons with
hideBold,hideItalic,hideHeadings,hideBulletList,hideOrderedList,hideBlockquote,hideUndoRedo, and so on.
Rendering (read-only)
children. Supports GitHub Flavored Markdown (tables, strikethrough, task lists) and <mark> highlights; all other raw HTML is stripped.
Storing it
Give the field therich_text type, then save the onChange string to it and pass it back into <Markdown> or <MarkdownEditor content={...} />.