// admin tools · 13
Markdown press
GitHub-flavoured Markdown with a live preview, sanitised on every keystroke. Toolbar shortcuts, code colouring, file import and clean HTML export.
// runs locally — nothing is uploaded
Your draft is saved in this browser's local storage so it survives a reload. Remote images in your Markdown are loaded by your browser from their own servers — tick block remote images to stop that.
How it works
What it does
This is a split-screen Markdown editor with a live preview. It supports GitHub-flavoured Markdown (GFM): tables with column alignment, task lists, strikethrough, autolinked URLs, fenced code blocks and inline HTML. Fenced code gets light syntax colouring for JavaScript, TypeScript, Python, shell, SQL, Go, Rust, PHP, C-family languages, JSON, CSS, HTML, YAML and diffs. When you are done, copy the HTML or download a .md file or a standalone .html page with its own minimal stylesheet.
How to use it
- Type on the left and the preview updates as you go. Use write or preview to focus on one pane. On small screens the panes stack.
- Toolbar buttons act on the selection: wrap it in bold, turn the selected lines into a list, or press H# again to step the heading level. Shortcuts:
Ctrl/⌘+Bbold,Iitalic,Klink,Ecode. Edits go through the browser's undo stack, soCtrl+Zworks. - Import a file with the button or drag it onto the editor. Files are read in the browser with
FileReader.
How rendering stays safe
Markdown allows raw HTML, so a pasted README could contain <script> tags, onerror= handlers or javascript: links. Every render goes through two steps before it reaches the page:
- parse
- marked 18.1 (MIT licence) converts Markdown to HTML using its GFM rules.
- sanitise
- DOMPurify 3.4 (Apache-2.0 / MPL-2.0) removes scripts, event handlers, dangerous URLs, inline styles, forms and SVG or MathML payloads. Checkboxes are kept only as disabled task-list markers.
- links
- External links get
target="_blank"andrel="noopener noreferrer", so a linked page can't reach back into this one.
Both libraries are bundled with the site. Nothing is fetched from a CDN at runtime. Copied and downloaded HTML is the same sanitised output you see in the preview.
FAQ
Will it look exactly like GitHub?
Structure, yes. Tables, task lists and code fences follow the GFM spec. GitHub adds extras on top, such as heading anchors, emoji shortcodes, @mentions, Mermaid diagrams and alerts, which are not rendered here. The exported .html uses a neutral GitHub-like style with automatic dark mode.
Where is my draft stored?
In your browser's localStorage for this site, on this device only. It is never uploaded. Press clear or clear your site data to remove it.
Does anything leave my browser?
Your text doesn't. The only network requests are images your Markdown points at, which your browser loads like any web page would. Tick block remote images to prevent them.