Markdown Editor
A split editor with a markdown textarea and a live rendered preview, including a toolbar for inserting common markdown syntax and a self-contained zero-dependency markdown renderer.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
value | string | — | Initial markdown text content |
placeholder | string | — | Textarea placeholder text |
preview | string | side | Preview layout: side (textarea and preview side by side), tab (toggle), or off (textarea only) |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/markdown-editor.js"></script> import "./pura/lib/markdown-editor.js";