Markdown to JSON
approvedby Meghan Lendhe
This plugin has not been manually reviewed by Obsidian staff. Copy a Markdown note as structured JSON blocks to the clipboard.
Markdown to JSON (Obsidian Plugin)
Copy a note written in Obsidian (Markdown) into structured JSON blocks, optimized to be pasted into the companion Figma plugin that generates separate text layers for fast case study page layout.
- Command:
Copy Markdown as JSON blocks - Plugin ID:
md-to-json - Author: Meghan Lendhe — https://meghan-lendhe.github.io/
What it does
- Adds a command in Obsidian’s Command Palette to export the current note as JSON.
- Converts Markdown into ordered blocks:
- Headings (
#…######) →h1–h6 - Body → each non-empty line becomes its own block
- Bullets (
-,*,+) → each bullet becomes its own block
- Headings (
Companion plugin (Figma)
This exporter is intended to be used with:
- JSON to Text (Figma Plugin): https://github.com/meghan-lendhe/json-to-text
Output format
The plugin copies JSON like:
[
{ "type": "h1", "level": 1, "text": "Title", "id": "h1-0" },
{ "type": "h2", "level": 2, "text": "Overview", "id": "h2-1" },
{ "type": "body", "text": "Problem: ...", "id": "body-2" },
{ "type": "body", "text": "Time: 14 weeks", "id": "body-3" },
{ "type": "list", "text": "A bullet item", "id": "list-4" }
]
Block fields
type(required):h1–h6|body|listlevel(optional): 1–6 (for headings)text(required): string content for that line/itemid(required): identifier generated during export (useful for ordering and potential “update” flows later)
How to use
- Open your case study note in Obsidian.
- Press
Ctrl + Pto open Command Palette. - Run: Copy Markdown as JSON blocks
- Open Figma → run the JSON to Text plugin.
- Paste JSON into the plugin UI and click Import.
Installation (manual)
- Build the plugin (see Development).
- Copy the built files into your vault:
<YourVault>/.obsidian/plugins/md-to-json/
Files needed:
manifest.jsonmain.js
This matches the common layout used by the Obsidian sample plugin template.
- In Obsidian: Settings → Community plugins → enable Markdown to JSON.
If
.obsidian/pluginsdoesn’t exist yet, create it.
Development
This project was bootstrapped from the Obsidian sample plugin template (TypeScript → compiled main.js).
Prerequisites
- Node.js + npm
- Obsidian desktop app
Install
npm install
Dev build (watch)
npm run dev
Production build
npm run build
After rebuilding, reload the plugin in Obsidian (toggle it off/on) to pick up changes.
Parsing rules (current)
- Headings:
#{1,6} Heading→ a heading block (h1–h6) - Body: each non-empty line that isn’t a heading or list item →
body - Lists:
- item/* item/+ item→list - Empty lines are ignored
Known limitations
- Markdown styling isn’t preserved (bold/italic/links are exported as plain text).
- Tables, callouts, embeds, and images aren’t converted.
- IDs are generated during export; editing the note can change ordering/IDs.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.