@generative-dom/preset-markdown
v0.4.0
Published
Generative DOM preset — the eight CommonMark plugins (base, inline, heading, code, quote, list, link, table) bundled as a single zero-config plugin set
Maintainers
Readme
@generative-dom/preset-markdown
The eight CommonMark plugins of Generative DOM bundled as a single zero-config preset. Drop it in when you want full Markdown without the kitchen-sink of @generative-dom/preset-all.
Installation
pnpm add @generative-dom/core @generative-dom/preset-markdownUsage
import { GenerativeDom } from '@generative-dom/core';
import { markdownPreset } from '@generative-dom/preset-markdown';
const md = new GenerativeDom(container, { plugins: markdownPreset() });
md.push('# Hello\n\nWorld\n');What's inside
| Plugin | Covers |
|---|---|
| @generative-dom/plugin-markdown-base | Paragraphs, line breaks, escaping, horizontal rules |
| @generative-dom/plugin-markdown-inline | Emphasis, strong, code spans, autolinks |
| @generative-dom/plugin-markdown-heading | ATX and Setext headings |
| @generative-dom/plugin-markdown-code | Indented and fenced code blocks |
| @generative-dom/plugin-markdown-quote | Block quotes (incl. nested) |
| @generative-dom/plugin-markdown-list | Ordered and unordered lists, task lists |
| @generative-dom/plugin-markdown-link | Links and images, including reference style |
| @generative-dom/plugin-markdown-table | GFM-style pipe tables |
When to use
@generative-dom/preset-markdown— pure CommonMark, smallest install@generative-dom/preset-llm— adds syntax highlighting, custom elements, interactive components, event delegation@generative-dom/preset-all— everything zero-config
License
MIT
