MDocForge Pro
MDocForge Pro is the enhanced edition of MDocForge — a single-file, browser-based, block-based Markdown/HTML document editor with live preview and multi-format export (PDF, Word, HTML, Markdown, PNG, plain text).
Everything from the standard MDocForge editor is included, plus a large set of professional/"pro" additions: more block types, themes & dark mode, page/cover-page design controls, undo/redo, find & replace, image uploads, table editing tools, project save/load, autosave, and printing.
Open mdocforge-pro.html in any modern browser — no install, no account, no server. Everything runs locally and your content never leaves your device.
Everything from the standard editor
- Markdown / HTML editing modes
- Split / Editor / Preview layout views
- Drag-and-drop block palette
- In-place visual editing of headings, paragraphs, quotes, lists, tables, images, and code
- Per-block toolbar (move up/down, duplicate, delete) and drag-to-reorder
- "Load sample" demo document
- Export to PDF, Word (.docx), HTML, Markdown, PNG, and plain text
- Word/character counters and status bar
The sections below cover what's new in Pro.
New block types
In addition to the original blocks (headings, paragraphs, quotes, lists, tables, images, code, dividers, links), Pro adds:
- Callout — a highlighted note box with three styles: 💡 Tip, ⚠️ Warning, and 📝 Note. The style is chosen from a dropdown directly on the block.
- Columns — a two-column layout block, each column independently editable with its own Markdown content.
- Table of contents — automatically generated from all H1/H2/H3 headings in the document, with clickable links that jump to each section. Updates live as you add or rename headings.
Slash-command quick insert ("/")
Type / inside any text block (heading, paragraph, quote, or callout) to open a Notion-style quick-insert menu. Start typing to filter the list of block types (Heading, Paragraph, Quote, Table, Image, Callout, Columns, Table of contents, etc.), then use the arrow keys and Enter — or click — to insert that block.
Enhanced table editing
Tables now include inline controls beneath them:
- + Row — add a new row
- + Column — add a new column (added to every row)
- − Column — remove the last column
- A small − button appears on each row to delete that specific row
Image upload & drag-and-drop
Image blocks are no longer URL-only:
- Click an empty image block to open a file picker, or drag an image file directly onto it.
- Uploaded images are embedded as base64 data directly in the document — no external hosting required.
- Existing images show a Replace button to swap them out.
Design & Export settings (🎨 Design)
A new Design button opens a settings panel with three tabs that control both the live preview and your exports:
Theme tab
Five built-in visual themes you can switch between instantly — they restyle headings, body text, tables, callouts, links, and more, both in the preview and in PDF/HTML exports:
- Classic — serif body text, soft purple accents (the original look)
- Modern — clean sans-serif, blue/teal accents
- Warm — warm serif tones with amber/red accents
- Mono — monospaced typography with green/red accents
- Slate — dark-background theme with lavender/pink accents
Page & PDF tab
- Page size — A4, Letter, or Legal (affects PDF export dimensions and the on-screen preview width)
- Margin — custom PDF margin in points
- Header/footer toggle — adds custom header text, custom footer text, and automatic page numbers to every PDF page
Cover page tab
- Optional cover page added to the start of PDF and DOCX exports, with editable Title, Subtitle, and Author/Date fields, styled according to the active theme
Dark mode (🌙)
A one-click toggle switches the entire editing interface (toolbar, panels, editor) between light and dark UI themes. This is independent from the document preview theme described above — you can write in a dark interface while previewing a light document theme (e.g. "Slate" for a dark document, or any other theme).
Undo / Redo (↶ / ↷)
Every meaningful edit — typing, formatting, adding/removing/reordering blocks, table edits, image changes — is tracked in a history stack (up to 100 steps). Use the toolbar buttons or keyboard shortcuts:
- Ctrl/Cmd + Z — undo
- Ctrl/Cmd + Y or Ctrl/Cmd + Shift + Z — redo
Find & Replace (🔍 Find, Ctrl/Cmd + F)
A find bar appears over the preview pane:
- Type a search term to highlight every match in the document, with a match counter (e.g.
3/12) - Step through matches with ↑ / ↓
- Enter a replacement and use Replace (current match) or All (every match across the whole document)
Resizable split view
The divider between the Editor and Preview panes can be dragged left or right to resize each pane to your preference.
Print (🖨 Print)
Sends the live preview directly to your browser's native print dialog — useful for quick printing or "Save as PDF" via the browser's own print-to-PDF feature, as an alternative to the built-in PDF exporter.
Project management (📁 Project)
Beyond exporting the document, Pro lets you save and restore your entire working project (content + settings):
- Save project (.json) — saves all blocks, the current mode (Markdown/HTML), and all Design settings (theme, page size, cover page, header/footer, dark mode, etc.) to a single
.jsonfile. - Load project (.json) — restores a previously saved project file (with a confirmation prompt, since it replaces your current document).
- Export project as .zip — packages your document as a
document.mdfile plus aproject.jsonsettings file, with any uploaded images extracted into animages/folder and referenced by relative path — handy for archiving or moving a project between machines.
Autosave
Your work is automatically saved to the browser's local storage as you edit (content and settings included). If you close the tab or reload the page, MDocForge Pro restores your last session automatically — no manual saving required for day-to-day use.
How it works (under the hood)
Like the standard edition, MDocForge Pro is a single static HTML file with embedded CSS/JavaScript, using CDN libraries for conversions:
- marked.js — Markdown → HTML rendering
- html2canvas — captures the document for PNG/PDF export
- jsPDF — assembles paginated PDFs (now theme- and page-size–aware, with optional headers/footers/page numbers and a cover page)
- FileSaver.js — triggers file downloads
- docx.js — generates
.docxWord files - JSZip (new in Pro) — builds the
.zipproject export bundle
Core model
Your document is stored as an array of block objects (e.g. {type:'callout', style:'tip', content:'...'} or {type:'toc'}), exactly as in the standard edition — but with new block types and richer metadata for the new features. A parallel settings object stores all Design-panel choices (theme, page size, margins, header/footer text, cover page fields, dark mode).
- Markdown round-trip: New block types (Callout, Columns, Table of Contents, Link) are stored in Markdown as special HTML comment markers (e.g.
<!--block:callout {...}-->), so a document containing these blocks can still be saved/loaded as a plain.mdfile without losing them. - History: Every change to the block array is snapshotted (as JSON) into an undo/redo stack.
- Theming: Each theme is defined as a set of CSS custom properties (fonts, colors, accents) applied both to the live preview canvas and injected into PDF/HTML export styles, so what you see in the editor matches what you export.
- PDF pagination: As in the standard edition, export height is sliced at safe block boundaries to avoid splitting content across pages — now also accounting for page size (A4/Letter/Legal), custom margins, header/footer reserved space, and an optional cover page.
- Persistence:
localStoragestores a JSON snapshot of{blocks, mode, settings}after every change (debounced), which is reloaded automatically on page load.
Because everything — editing, theming, exporting, and autosave — happens in the browser, no content is ever uploaded to a server.
Quick start
- Open
mdocforge-pro.htmlin a browser. If you have a previous session, it loads automatically; otherwise the sample report loads. - Write or paste content in the editor, or drag blocks (including Callouts, Columns, and Table of Contents) from the sidebar.
- Type
/in any text block for the quick-insert menu. - Click 🎨 Design to pick a theme, page size, cover page, and header/footer for your exports.
- Toggle 🌙 for a dark editing interface, use Ctrl+Z / Ctrl+Y to undo/redo, and Ctrl+F to find & replace.
- Use 📁 Project to save your work as a
.jsonfile or.zipbundle, or rely on autosave to pick up where you left off. - Click Export to download your document as PDF, DOCX, HTML, Markdown, PNG, or TXT — or use 🖨 Print for the browser's print/PDF dialog.