frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Quikdown – 17 KB bidirectional Markdown parser and rich-fence editor

https://github.com/deftio/quikdown
2•deftio•11h ago
Hi HN — I built Quikdown, a ~17 KB (6.5 KB gzipped), zero-dependency Markdown parser plus a drop-in split-view editor: Markdown source on one side, rendered output on the other, edit either side and get Markdown back.

Try it: https://deftio.github.io/quikdown/pages/edit/

What makes it more than another parser is that fenced blocks render inline — Mermaid diagrams, MathJax, syntax-highlighted code, SVG, CSV → tables, charts — and still round-trip back to Markdown.

Originally I built it for a human and an LLM editing the same document: the model emits Markdown with diagrams and code, you see it rendered, you both keep editing the same source, and a programmatic undo stack lets you roll back when the model makes a mess.

Fences: The editor ships with built-in renderers for syntax-highlighted code (highlight.js), Mermaid diagrams, MathJax equations, inline SVG, CSV/TSV/PSV → tables, GeoJSON → Leaflet maps, STL → Three.js 3D viewer, ABC → sheet music, and Vega/Vega-Lite charts. Fences round-trip to equivalent Markdown (normalized, not byte-for-byte — incidental whitespace and comments inside a fence may not survive exactly). For text-like fences (code, CSV/TSV tables) you can edit either side; for diagrams and equations you edit the source and the render follows. Custom fence handlers are a small callback API.

Bidirectional editing: quikdown_bd adds HTML → markdown conversion. Edit the preview side and get markdown back. It's tuned for quikdown's own HTML, not arbitrary HTML pasted from the web.

Programmatic undo/redo: The editor has a configurable undo stack (default 100 states). This matters when you have LLMs writing into the same document — agents make mistakes, and editor.undo() lets you roll them back without losing context. It's also exposed as an MCP tool.

Headless mode: showToolbar: false gives you a pure API — setMarkdown(), getMarkdown(), undo(), redo(), setTheme(), setMode(). Wire it to your own UI or let an agent drive it.

The editor lazy-loads fence libraries from CDN by default (~100 KB initial). There's also a standalone build (~7.7 MB / ~1 MB gzipped) that bundles everything for offline use.

Other things that might be of interest:

- Escapes all HTML by default — no eval, no dynamic regex, URL sanitization blocks javascript:/vbscript:/non-image data: URIs. Fence plugins are trusted extension points, so any HTML a plugin returns is the plugin's job to sanitize.

- Parser architecture is a four-phase pipeline (extract code → escape HTML → line-scan blocks → restore) — no AST in the core HTML path.

- AST/JSON/YAML output modules if you need structured data instead of HTML.

- MCP server with 24 tools for AI agent integration (headless parsing, filesystem ops, editor control).

- Streaming-friendly — I re-parse the whole buffer on every incoming chunk rather than maintaining incremental parser state; it's the naive approach, but it's held up fine at token-rate streaming in my testing (no formal benchmarks).

- Copy-as-rich-text puts the rendered preview on the clipboard — diagrams and charts are rasterized to PNG on the fly, so they paste cleanly into Google Docs, Gmail, and MS Word.

- Works in Node and browser, TypeScript definitions included.

It intentionally doesn't cover full CommonMark — definition lists and some edge-case syntax are omitted, though reference-style links and footnotes are opt-in.

Longer write-up: https://deftio.github.io/quikdown/pages/blog/

Examples: https://deftio.github.io/quikdown/pages/examples/

Docs: https://github.com/deftio/quikdown/tree/main/docs

Comments

deftio•2h ago
Hi HN-

This past year I've built and maintained Quikdown, a bidirectional markdown parser and companion editor in pure js, with batteries included fences for rendering rich content.

Try it live: https://deftio.github.io/quikdown/pages/edit/

The motivation was working with many different LLM frameworks and wanting to test tool calling and collaborative editing. Often I just wanted a pretty final output with rich support for diagrams, math, or other rendered content but, keep it editable. So a user (often me) could just work on the final (rendered) output while the LLM could see/seek/update/edit just using markdown under the covers. Quikdown editor supports md/split/rendered output and can run headless so you can bring your own UI. MCP support is included as well.

The Quikdown parser has zero dependencies and is based on regex and outputs HTML with built-in tags for triggering plugins for fences (like Mermaid, Vega-lite, code syntax, music and many more). A separate set of attributes allow tracking of bidirectional content so a user can edit markdown tables, code rendered in highlightjs and many other types in the rendered view. For complex rendered types (like Mermaid or STL) bidirectional support is not included but if you want to take that on there are hooks to support your own efforts.

While the parser has no dependencies , the editor lazy-loads appropriate libraries for rendering rich content. Supported fences include: Mermaid, MathJax, SVG, CSV/TSV/PSV tables, GeoJSON with live leaflet based pan-and-zoom, Sheet music (via ABC.js), Vega/Vegalite-charts, STL (via threejs), code highlighting (via highlightjs).

Also included is programmatic undo/redo - so if you are making a closed loop with another output service (LLM or some process) you can roll back content changes that were not desired.

All inline HTML is escaped by default - no eval() or other unsafe raw parsing of content is allowed and URL sanitization blocks script based urls. However if you are using the editor the plugins which render rich content are left to handle that content on their own and are hence "trusted".

Quikdown intentionally doesn't cover all of Commonmark compatibility - if you find some portion of the spec isn't covered that you need raise an issue or make a PR and I'll take a look.

A standalone "air-gapped" build is also provided so you can use quikdown locally with zero cloud support. The standalone build is about 8MB so not recommended for use in online applications.

Longer write-up: https://deftio.github.io/quikdown/pages/blog/

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
79•cauenapier•14h ago•26 comments

Show HN: Make PDFs look scanned (CLI or in the browser via WASM)

https://github.com/overflowy/make-look-scanned
95•overflowy•8h ago•47 comments

Show HN: StartupWiki – A Free Alternative to Crunchbase

https://startupwiki.tech/
162•shpran•10h ago•55 comments

Show HN: We post-trained a model that pen tests instead of refusing

https://www.argusred.com/cli
76•dk189•12h ago•35 comments

Show HN: My Windows XP portfolio with working Game Boy and iPod

https://mitchivin.com/
54•mitchivin•7h ago•26 comments

Show HN: Tiny – An interpeted dynamic langauge with inline Go native functions

https://github.com/confh/Tiny
36•confis•7h ago•5 comments

Show HN: Microcrad – Micrograd Reimplemented in C

https://github.com/oraziorillo/microcrad
64•oraziorillo•3d ago•21 comments

Show HN: Ember, a native iOS Hacker News reader I built around accessibility

https://github.com/DatanoiseTV/ember-hackernews
89•sylwester•9h ago•21 comments

Show HN: Rocannon – Any Ansible module to MCP Tool, record sessions as playbooks

https://github.com/msradam/rocannon
2•msradam•2h ago•0 comments

Show HN: Agentic coding workflows built on Git worktrees and task evidence

https://github.com/alex-reysa/glueRun-go
5•alexreysa•2h ago•0 comments

Show HN: Domphy – plain-object UI for tool apps, AI-correctable output

6•khanhhuunguyen•2d ago•2 comments

Show HN: Codeflowmap – map a codebase's read/write/auth data flows

https://github.com/man-consult/code-mapper
3•brian-m•2h ago•0 comments

Show HN: FERNme – agent memory that updates with ~zero LLM calls

https://github.com/mirkofr/FERNme
3•mirkofr•3h ago•0 comments

Show HN: HN Game Stories – mini-documentary of games that hit the front page

https://video.intellios.ai
2•coolwulf•3h ago•0 comments

Show HN: Vitrus – the company brain that tells you what it doesn't know

https://github.com/ahmetvural79/Vitrus
3•ahvural•3h ago•0 comments

Show HN: TLA+ Process Studio

https://tlaplus-process-studio.com/?example=meeting-lifecycle
6•uptodatenews•4h ago•0 comments

Show HN: Criterion Closet as a website – pull any of 1,247 films off the shelf

https://the-criterion-closet.vercel.app
20•olievans•13h ago•7 comments

Show HN: Onsight: pay a local to photograph any spot in San Francisco, on demand

https://onsight.photo/san-francisco
7•pro_methe5•4h ago•2 comments

Show HN: Notedog – Git-friendly portable Markdown journal, edit from a laptop

https://notedog.run/
4•hibariya•4h ago•0 comments

Show HN: Talos – Open-source WASM interpreter for Lean

https://github.com/cajal-technologies/talos
100•mfornet•2d ago•27 comments

Show HN: GitGauge – A Way to Try Tell If a Repo Is Authentic

https://github.com/Davey2Waveyy/gitgauge
4•davey2wavey•4h ago•1 comments

Show HN: Metiq: a real time 3D globe for 100 public datasets

https://metiq.space
143•rakeda•4d ago•42 comments

Show HN: LoopFlow – loop engineering for Claude Code

https://github.com/faisalishfaq2005/loopflow
3•faisalishfaq•5h ago•1 comments

Show HN: Gerrymandle - Daily puzzle game where you redraw electoral districts

https://gerrymandle.cc/
226•realmofthemad•2d ago•77 comments

Show HN: MiniPCs.zip (charting the pareto frontier of MiniPCs)

https://minipcs.zip
3•yathern•6h ago•0 comments

Show HN: Persona.js – a vanilla-JS agent UI library with native WebMCP (MIT)

https://www.persona-chat.dev/
10•becomevocal•7h ago•12 comments

Show HN: An ASCII 3D Rendering Engine

https://glyphcss.com
9•apresmoi•7h ago•5 comments

Show HN: An n8n alternative where coding agents build the workflows, not humans

https://velane.sh/
4•abhishekraj272•7h ago•0 comments

Show HN: Cody – Voice control for Neovim using its own commands, LSP

https://github.com/juancgarza/cody
3•jcgr•8h ago•0 comments

Show HN: Are You in the Weights?

https://www.intheweights.com/
458•turtlesoup•2d ago•242 comments