Note: This repository is a fork of antonmedv/textarea.
A zero-dependency, serverless Markdown editor that lives entirely in your URL. Write, preview, and share documents by simply sending a link -- no database, no accounts, no servers required.
Live Demo: danielcregg.github.io/hashmark
HashMark is a feature-rich Markdown editor that runs entirely in the browser. It encodes your document into the URL hash using deflate compression, enabling you to share complete documents as links. It supports GitHub-Flavored Markdown, Mermaid diagrams, KaTeX math equations, syntax highlighting for 180+ languages, and multiple themes.
- Full GFM Markdown -- Complete GitHub-Flavored Markdown support with live preview
- Three View Modes -- Edit, Split, or Preview mode for flexible editing
- URL-Based Storage -- Documents encoded in the URL hash using deflate compression
- Mermaid Diagrams -- Eight diagram templates including flowcharts, sequence, class, state, ER, Gantt, pie, and mind maps
- Math Equations -- KaTeX rendering for inline (
$...$) and block ($$...$$) math - Syntax Highlighting -- Highlight.js support for 180+ languages with code block templates for 16 popular languages
- Three Themes -- Light, Dark, and Sepia themes that persist across sessions
- Formatting Toolbar -- Sidebar with bold, italic, headings, lists, tables, images, blockquotes, and more
- Keyboard Shortcuts --
Ctrl+B(bold),Ctrl+I(italic),Ctrl+K(link),Ctrl+Z/Y(undo/redo),Tab(indent) - Smart Editing -- Auto-closing pairs, smart list continuation, block indent/dedent
- QR Code Sharing -- Generate QR codes for mobile sharing
- Export Options -- Download as
.md, copy as HTML, or print/export to PDF - Dual Persistence -- Stored in both localStorage and URL hash
- Emoji Shortcodes --
:smile:,:rocket:,:fire:, and more
- A modern web browser with JavaScript enabled
- No installation, server, or build tools required
No installation is needed. HashMark is a single-file static application.
To self-host, clone the repository and serve index.html:
git clone https://github.com/danielcregg/hashmark.git
cd hashmark
# Serve with any static file server, e.g.:
python -m http.server 8000Alternatively, deploy directly to GitHub Pages.
- Open the editor at danielcregg.github.io/hashmark
- Write your Markdown in the editor pane
- Toggle between Edit, Split, or Preview modes
- Share by clicking the Share button or generating a QR code
- Export as
.md, HTML, or PDF
Keyboard Shortcuts:
| Shortcut | Action |
|---|---|
Ctrl+B |
Bold |
Ctrl+I |
Italic |
Ctrl+K |
Insert link |
Ctrl+S |
Save |
Ctrl+Z |
Undo |
Ctrl+Y |
Redo |
Tab |
Insert 2 spaces |
F11 |
Toggle fullscreen |
| Technology | Purpose |
|---|---|
| JavaScript | Core application logic |
| HTML5 | Single-file application structure |
| CSS3 | Theming and responsive layout |
| Marked.js | Markdown parsing (v11.1.1) |
| Highlight.js | Syntax highlighting (v11.9.0) |
| KaTeX | Math equation rendering (v0.16.9) |
| Mermaid | Diagram rendering (v10, lazy-loaded) |
| QRious | QR code generation (v4.0.2) |
| CompressionStream | Native deflate compression for URL encoding |
| GitHub Pages | Static hosting |
This project is licensed under the MIT License. See the LICENSE file for details.