MarkdownEditor

fancy-code

Markdown editor + live preview.

Registry JSON
Why
Apps keep hand-rolling a <textarea> for markdown — losing tokenization, sizing-token alignment, and a preview. MarkdownEditor is the markdown-aware sibling of CodeEditor: a real editor + an optional live preview, with no new runtime dependency.
What
A CodeEditor on the registered markdown language (headings, emphasis, code, links, blockquote, list-marker highlighting) beside an optional preview pane. Controlled via value + onValueChange; the preview renders with a tiny dependency-free renderMarkdown (HTML-escaped input, safe by default) you can swap for a full CommonMark lib via renderPreview.
How
Render <MarkdownEditor value onValueChange mode="split" />modesplit / edit / preview. Import the package stylesheet for the preview prose. renderMarkdown + tokenizeMarkdown are exported for custom hosts.