Headless package
@unsanity/markdown-editor includes MarkdownEditor, MarkdownPreview, chrome context, and CodeMirror command helpers. For app code, prefer the registry wrappers under @/components/markdown-editor/* after npx shadcn@latest add.
Install
npm install @unsanity/markdown-editor import "@unsanity/markdown-editor/styles.css";
Preview Tailwind
@source "../../node_modules/streamdown/dist/*.js"; @source "../../node_modules/@streamdown/cjk/dist/*.js"; @source "../../node_modules/@streamdown/code/dist/*.js"; @source "../../node_modules/@streamdown/math/dist/*.js"; @source "../../node_modules/@streamdown/mermaid/dist/*.js";
Exports
MarkdownEditor— Bear-style plain-text editingMarkdownPreview— Streamdown static renderuseMarkdownEditorChrome— toolbar/menubar statewrapSelection,setCurrentLineHeading, etc.