Write Markdown, export pixel-perfect paginated PDFs — entirely in your browser.
What you see in the live preview is exactly you will see what lands in the PDF: same stylesheet, same rendered DOM. No backend, no uploads.
Built by Atom · Live at md.atom.sa
Most "Markdown to PDF" tools render your document twice — once for the screen, once for print — and the two drift apart. Scripto uses one stylesheet and one rendered DOM for both, then paginates with real CSS Paged Media via Paged.js. The result is a PDF that matches the preview by construction, with selectable text, embedded fonts, and live links.
- Markdown → pixel-perfect paginated PDF — real page boxes, running headers/footers, page numbers, and a table of contents with true page numbers.
- 21 document skins plus one-click presets and a visual theme gallery.
- Fully offline — installable PWA; works with no network after first load.
- Zero-knowledge privacy — optional passphrase lock encrypts documents at rest with AES-256 (Web Crypto). The passphrase is never stored or sent.
- Arabic & RTL — complete English + Arabic UI with correct right-to-left layout and Arabic fonts (Cairo).
- AI-optional — bring your own key; requests go straight from the browser to your provider. Never required.
- CodeMirror 6: Markdown highlighting, line numbers, word-wrap, undo/redo
- Formatting toolbar + shortcuts (
⌘B/⌘I/⌘E/⌘K, lists, quotes) - Find & replace (
⌘F), autosave tolocalStorage, cross-tab sync - Command palette (
⌘K), live outline navigator, slash commands - Optional AI assist — bring-your-own-key, direct browser → provider
- GitHub-Flavored Markdown, tables, task lists, footnotes, definition lists
- Emoji (
:rocket:),==highlight==,~sub~,^super^ - Callouts / admonitions (
:::tip … :::) - Syntax-highlighted code (Prism, 4 themes, copy button)
- Math (KaTeX), Mermaid diagrams, HTML passthrough
- ASCII / box-drawing diagrams (
```ascii; auto-detected in untagged and```textfences,```plainopts out) — crisp, auto-fitted figures with optionaltitle="…"captions
- A4 / Letter / Legal / A3 / A5 / custom sizes; portrait & landscape
- Margin presets + custom margins
- Running headers (from the H1) & footers, page numbers (
x / y) - Table of contents with real page numbers, cover page, watermark
- Repeating table headers; rows never split across pages
- 21 document skins, one-click theme presets, visual theme gallery
- Custom accent color + custom CSS injected into preview and output
- No server; everything stays in the browser (
localStorage) - Optional passphrase lock: AES-256 (Web Crypto) encryption at rest
- Zero-knowledge — passphrase never stored or sent; auto-lock on inactivity
- Full English + Arabic UI with correct RTL layout and Arabic fonts (Cairo)
- Configurable document direction
- Import: Markdown, Word (
.docx), HTML, and GitHub README (paste a repo URL) - Export: PDF, Word (
.doc), self-contained HTML, Markdown
Requirements: Node 20+.
# install dependencies
npm install
# start the dev server (editor at /app, marketing site at /)
npm run dev
# type-check + prerender the full site → dist/ (~102 static pages + the app)
npm run build
# unit tests (SEO build transforms, blog loader)
npm run testOther scripts: npm run preview, npm run typecheck, npm run lint, npm run format.
The dist/ output is fully static — deploy it to any static host (Vercel, Netlify, GitHub Pages, S3). No environment variables or server required. vercel.json ships cache + security headers, and api/og.tsx (optional) generates social-card images on Vercel's edge.
Deep links: /app?template=<id> opens any of the 50+ templates as a new document; /app?skin=<id> applies a skin — handy for docs and integrations.
| Concern | Choice | Why |
|---|---|---|
| Build / dev | Vite 5 | Fast HMR, ESM, simple config; pinned to 5.x for Node 20 compat. |
| UI | React 18 + TypeScript (strict) | Mature ecosystem; strict typing for safety. |
| Styling | Tailwind CSS 3 + CSS variables | Utility speed for app chrome; CSS vars for theming and the document stylesheet. |
| Editor | CodeMirror 6 (@uiw/react-codemirror) |
Best-in-class code editor: extensions, decorations, search. |
| Markdown | react-markdown + remark/rehype | Plugin-based AST pipeline; full control over rendering. |
| Math | KaTeX | Fast, print-friendly math. |
| Code highlight | Prism (rehype-prism-plus) |
AST-level highlighting + line numbers. |
| Diagrams | Mermaid (lazy) | Text-to-diagram, renders to inline SVG. |
| Pagination | Paged.js | Real CSS Paged Media: page boxes, running headers/footers, page numbers, repeating table headers. |
| Import | mammoth (DOCX→HTML) + turndown (HTML→MD) | Reliable Word and HTML import. |
| Offline | vite-plugin-pwa (Workbox) | Service worker + precache + runtime caching. |
| Crypto | Web Crypto API | Native AES-GCM / PBKDF2 — no crypto dependency. |
| Marketing/SEO | vite-react-ssg + react-router | Prerenders ~100 content pages to static, zero-JS HTML (landing, guides, per-template/skin pages, blog) with sitemap, hreflang and JSON-LD. |
| Tests | Vitest | Unit coverage for the SEO build transforms and blog loader. |
For the full design rationale, the rendering pipeline, and the "preview === PDF" mechanism, see ARCHITECTURE.md — the static marketing/SEO layer is documented there (§19) and operationally in docs/SEO_PLAYBOOK.md.
Scripto's UI ships in English and Arabic, with correct right-to-left layout and Arabic fonts (Cairo). Document direction is configurable independently of the UI language.
To add a language:
- Add an entry to
LANGUAGESand aSTRINGSmap insrc/lib/i18n.ts. - Provide translations for the string keys — any missing key falls back to English.
Layout stays correct across languages because the app uses logical CSS (e.g. margin-inline-start instead of margin-left), so RTL "just works" without mirrored stylesheets.
Contributions are welcome. Please read CONTRIBUTING.md and ARCHITECTURE.md to get oriented, then open an issue or a PR. TypeScript is strict (no any), updates are immutable, and npm run typecheck && npm run build should stay green.
Ideas under consideration (not commitments):
- More document skins and community-contributed presets
- Additional UI languages beyond English + Arabic
- Richer front-matter driven export configuration
- Optional cloud sync as a strictly opt-in add-on (local-first stays the default)
MIT — do what you like, no warranty.
Scripto stands on excellent open-source work: Paged.js · CodeMirror · react-markdown · KaTeX · Mermaid · Tailwind CSS
If Scripto is useful to you, please ⭐ star the repo — it helps others find it.