Marcus Breiden224 downloadsReshape pasted or whole-note Markdown to fit a note's structure — heading cascade, footnote renumbering and dedup — plus a runnable, consent-gated script library.
Solid formatting, block by block.
Reshape pasted or whole-note Markdown to fit a note's structure — heading cascade, footnote renumbering and dedup — plus a runnable, consent-gated script library.
Markdown Mason is a desktop Obsidian plugin for the moment after you paste. When you drop
an answer from Perplexity (or another LLM or web source) into an existing note, the heading
levels rarely match and citation numbers restart from [1], colliding with footnotes you
already have. Mason fits the incoming text into the target note instead: it cascades headings
relative to where the cursor sits, turns inline citations into real footnotes, renumbers and
deduplicates them against what's already there, and files them into a Resources section.
The transforms run as small scripts managed by the plugin — installed from a curated, reviewed library or imported from your own vault — not as loose files scattered through your notes.
Status: early (
v0.0.1). Desktop-only; requires Obsidian1.6.6or newer.
Open Settings → Community plugins → Browse, search for Markdown Mason, then Install and Enable. Markdown Mason is desktop-only and requires Obsidian 1.6.6 or newer. For manual installation, updating, and verification steps, see docs/installation.md.
The full walkthrough — common workflows, format-in-place, when to use which paste command, and per-script commands — is in docs/usage.md.
Three commands cover the paste-and-format workflows. Pick by what you need:
| Command | id | What it runs | Scope |
|---|---|---|---|
| Paste and run scripts | mason.pasteAndRunScripts |
Runs your enabled paste-converter scripts on the clipboard (e.g. a Perplexity copy → structured Markdown) and inserts the result at the cursor; falls back to a plain paste if no script matches or one errors. | Clipboard → cursor |
| Paste and format | mason.pasteAndFormatText |
Pastes the clipboard, then applies the 7-step cleanup recipe scoped to just the pasted text — 4 cleanup steps, 2 list steps, and normalize headings — as one undo. No scripts, no cascade, no footnote steps. | Clipboard → pasted text |
| Format selection | preset.formatSelection |
Runs the full 11-step recipe on the selection (or whole note) — the same 7 cleanup steps plus cascade headings and the 3 footnote steps. | Selection + whole note |
The crisp distinction: Paste and run scripts is about converter scripts; Paste and format (7 steps) and Format selection (11 steps) are about cleanup. The other built-in commands (each footnote and heading step on its own, plus Run script…) are listed in the Commands Reference.
No default hotkeys are registered — assign your own under Settings → Hotkeys.
Mason's scripts are real JavaScript running with full plugin permissions — there is no sandbox. Safety comes from policy, disclosure, and consent, in two tiers:
To write your own, see docs/SCRIPT_AUTHORING.md.
Obsidian's automated review flags two capabilities this plugin uses. Both are intrinsic to its features and disclosed here so you know exactly what they do:
fs module rather than the vault API.
This is why the plugin is desktop-only: it can read and write files on the
device outside the vault. Script execution is consent-gated (see above), and the
reviewed official library is limited to editing Markdown in the current note.If you find Markdown Mason useful, you can support development via Buy Me a Coffee or GitHub Sponsors.
The original German design briefing for the project is preserved at
PROJECT_BRIEFING.de.md.
MIT © Marcus Breiden