npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@domternal/extension-markdown

v0.12.1

Published

Bidirectional Markdown for Domternal: parse Markdown into the editor (paste, insert, setContent) and serialize documents back to GitHub-flavored Markdown, covering the full Notion-style schema

Readme

@domternal/extension-markdown

Version MIT License

Bidirectional Markdown for the Domternal editor: parse GitHub-flavored Markdown into the document and serialize the document back to Markdown, covering the full Notion-style schema.

  • Import: insertMarkdown / setMarkdownContent commands, plus automatic conversion of Markdown-looking plain-text pastes (opt-out).
  • Export: getMarkdown(editor) and a downloadMarkdown helper, with a warning channel for anything Markdown cannot express (alignment, colors, merged table cells).
  • Headless: parseMarkdown / serializeMarkdown work against any schema without an editor instance.
  • Coverage: headings, lists (bullet, ordered with start, GFM task lists), blockquotes, fenced code with language, tables with column alignment, images, links and autolinks, bold/italic/strike/inline code, hard breaks, LaTeX math ($...$, $$ blocks), emoji glyphs.

Links

Website    •    Documentation    •    Live examples

Install

pnpm add @domternal/extension-markdown

@domternal/core and @domternal/pm are peer dependencies.

Usage

import { Editor } from '@domternal/core';
import { Markdown, getMarkdown, downloadMarkdown } from '@domternal/extension-markdown';

const editor = new Editor({
  extensions: [/* your extensions */, Markdown],
});

// Import
editor.commands.insertMarkdown('## Hello\n\n- [x] done\n- [ ] open');
editor.commands.setMarkdownContent('# Fresh document');

// Export
const { markdown, warnings } = getMarkdown(editor);
downloadMarkdown(editor, 'notes.md');

Markdown-looking plain-text pastes convert automatically. Pastes that carry an HTML flavor, plain prose, and pastes into code blocks are never touched. Disable with Markdown.configure({ paste: false }).

Options

| Option | Default | Description | | --- | --- | --- | | paste | true | Convert Markdown-looking plain-text pastes into rich content. | | tightLists | true | Serialize lists without blank lines between items. | | specs | null | Extra or replacement Markdown mappings for custom nodes and marks. |

Headless usage

import { parseMarkdown, serializeMarkdown } from '@domternal/extension-markdown';

const doc = parseMarkdown('# Title', schema);
const { markdown, warnings } = serializeMarkdown(doc);

Custom nodes without a mapping degrade gracefully: content is preserved as plain text and a warning is reported instead of failing. Custom mappings plug in via Markdown.configure({ specs }) or the specs option of serializeMarkdown.

Fidelity notes

Markdown cannot express everything the editor can. The serializer keeps the content and reports a warning for: text alignment and line height, text and background colors, underline, merged table cells, multi-block table cells, image resize dimensions, toggle (details) structure, and mentions. Round trips of the supported subset are exact and covered by tests.

License

MIT