A FoundryVTT module that adds a "Paste Markdown" toolbar button to every rich-text editor — Journal pages, item descriptions, actor bios, scene notes. Paste GitHub-Flavored Markdown into the dialog, click Insert, and you get clean HTML at the cursor. Supports Obsidian syntax.
System-agnostic. Works on Foundry v13 and v14.
If there's a workflow that annoys you, a small thing that could be smoother, or a feature you keep wishing existed — feel free to reach out on GitHub and describe it. A short note is plenty.
- Toolbar button in every ProseMirror editor (toggleable per surface), except for the chat box as there's not enough space.
- GFM support: tables, task lists, strikethrough, fenced code, autolinks
- Obsidian support: frontmatter → Properties table, callouts → styled blockquotes, wikilinks → plain text
- Foundry enricher tokens pass through (
@UUID[Actor.x]{Bob},[[/r 1d20]], etc.) - HTML sanitization via DOMPurify — no XSS surface
- Inserts at the cursor (or replaces the selection) — non-destructive
In Foundry's Add-on Modules tab → Install Module → paste this manifest URL:
https://github.com/martin-papy/markdown-paste/releases/latest/download/module.json
- Open any editor with a ProseMirror toolbar (Journal page, item description, actor bio…).
- Click the Markdown icon in the toolbar.
- Paste your Markdown into the textarea.
- Click Insert. Converted HTML lands at the cursor.
Found under Configure Settings → Module Settings → Markdown Paste:
All settings are world-scope.
npm install
npm testThe unit-testable conversion pipeline (scripts/convert.js) is covered by tests/convert.test.js via Node's built-in test runner + jsdom.
Runtime libraries (marked, dompurify) are pinned in package.json and the
browser-ready ESM bundles live in vendor/. Those bundles are generated — do
not edit them by hand.
npm install # install pinned dependencies
npm run vendor # regenerate vendor/ from node_modules
npm test # verify conversion still behavesCI fails if vendor/ is out of sync with the pinned versions. A weekly
update-deps workflow bumps the libraries to latest, regenerates vendor/, runs
the tests, and opens a pull request automatically.
This module has been developped with the help of an AI Coding assistant (Claude Code). The code has been thoroughly reviewed and tested by a human (me).
MIT — see LICENSE.


