Markdown Converter is a locally running browser extension that provides live Markdown preview, HTML/PDF export, PNG screenshots, Mermaid diagram rendering, and KaTeX math rendering for Chrome and Firefox.
- Live Markdown preview
- GitHub Flavored Markdown support
- Mermaid diagrams and KaTeX math
- HTML export, PDF export, and PNG screenshots
- Light and dark themes
- Local autosave
- One repository, two build outputs:
dist/chromeanddist/firefox
![]() |
![]() |
![]() |
Chrome and Firefox both use a single side panel/sidebar UI. Clicking the toolbar icon opens that panel.
npm run buildOther commands:
npm run build:chrome
npm run build:firefox
npm run cleanAfter npm install, package both browser builds with one command:
npm run packagePackage only Chrome:
npm run package:chromePackage only Firefox:
npm run package:firefoxOutput files are placed in release/chrome/ and release/firefox/ respectively. The Chrome package is created as a standard upload .zip, and the Firefox package is created with web-ext build as the correct unsigned AMO upload .zip.
For Firefox, web-ext build produces the correct unsigned upload package as a .zip. Mozilla signs that upload and returns the final .xpi during the AMO publishing flow.
Chrome:
- Open
chrome://extensions - Enable Developer mode
- Click “Load unpacked”
- Select
dist/chrome - Click the extension icon in the toolbar to open the side panel UI
Firefox:
- Open
about:debugging#/runtime/this-firefox - Click “Load Temporary Add-on”
- Select
dist/firefox/manifest.json - Click the extension icon in the toolbar to open the sidebar UI
# Markdown Converter
This is **bold** text and this is `inline code`.
- item 1
- item 2
| Name | Value |
|------|-------|
| Foo | Bar |
```javascript
console.log('hello');
```
```mermaid
graph TD
Start --> Review
Review --> Done
```
Inline math: $E = mc^2$
Escaped dollar sign: Price is \$18 to \$20.
$$
\int_0^1 x^2 dx = \frac{1}{3}
$$- Inline and display math are rendered with KaTeX in both Chrome and Firefox builds
- Single-dollar math like
$e^{i\pi} + 1 = 0$is supported alongside$$...$$,\(...\), and\[...\] - Escaped dollar signs like
\$18are preserved as literal currency values instead of being treated as math delimiters - Mixed content with text, inline math, and thematic breaks now normalizes more reliably in preview output
- If you are writing currency ranges such as
Price is \$18 to \$20, keep the dollar signs escaped to avoid ambiguous math parsing
Copy HTML: copies generated HTMLHTML: downloads a standalone.htmlfilePDF: opens the browser print flow for PDF exportScreenshot: downloads a.pngimageClear: clears editor content after confirmation
Screenshot sizing differs by browser surface on purpose: Chrome side panel uses a 640px minimum width, Firefox sidebar uses 320px to fit the narrower container.
markdownconverter/
├── manifest.json
├── manifest-firefox.json
├── sidebar.html
├── sidebar.js
├── styles.css
├── styles-sidebar.css
├── markdown-converter-core.js
├── screenshot-utils.js
├── background.js
├── libs/
├── images/
└── scripts/build.js
- Edit
markdown-converter-core.jsfor shared behavior - Edit
sidebar.jsonly for browser-specific runtime differences - Edit
background.jsfor shared background behavior - Rebuild with
npm run buildafter changes
The repository already includes local runtime assets in libs/ and images/, so no setup script or CDN swap is required.
- Build fails: make sure Node.js is installed and run commands from the project root
- Chrome cannot load: check
dist/chrome/manifest.json - Firefox cannot load: check
dist/firefox/manifest.jsonand use Firefox 140+ - Preview does not render: verify the files in
libs/exist and inspect the extension console - Display math shows a vertical scrollbar or gets clipped: update to the latest build. The preview styles now force KaTeX display blocks to scroll horizontally only, add vertical padding, and keep preview containers at
min-height: 0so formulas remain fully visible in the sidebar. - Mixed math and plain text render incorrectly around
$or---: update to the latest build. The shared renderer now normalizes thematic breaks before Markdown parsing and handles escaped dollar signs and standalone single-dollar math more accurately.
- License: MIT, see
LICENSE - Before publishing publicly, fill in the real
repository,author, and issue tracker metadata inpackage.json
Version: 1.1.0
Updated: 2026-04-05
Compatibility: Chrome 90+, Firefox 140+



