Exporting — overview
Three export formats from the toolbar's download menu: Markdown (.md), Word (.docx), and PDF (via Print). Plus a Copy-as-Markdown one-click button. All client-side, no server roundtrip.
Exporting in sweetdocs is a one-click affair. The download icon in the doc toolbar opens a small menu with three formats; an adjacent button copies the doc to the clipboard as Markdown.
The export menu
| Format | What it does | Article |
|---|---|---|
| Markdown (.md) | Verbatim Markdown source as a downloadable file | Export as Markdown |
| Word (.docx) | Real Word document: headings, lists, tables, embedded images | Export as Word |
| PDF (via Print) | Opens the browser print dialog with a clean stylesheet; user picks “Save as PDF” | Export as PDF and Printing |
The menu is on Markdown docs only (the SVG editor is a different surface). The button next to it copies the whole doc as Markdown to your system clipboard.
What’s the same in every export
- The doc title is prepended as an H1 if your body doesn’t already start with one
- Images point at their stable R2 URLs, so they keep loading after the export leaves your machine. Word export goes one step further — it downloads the image bytes and embeds them inside the
.docxso the file is self-contained - Theme colors and fonts don’t carry over — exports use neutral typography in each destination (Markdown is plain, Word uses its own styles, PDF uses our print stylesheet)
- Comments, history, audit log, share state, AI conversations — none of these are in the export. Only the document body.
Where exports happen
All three exports run client-side:
| Format | Engine |
|---|---|
| Markdown | A Blob with the doc’s content, downloaded via a hidden <a download> |
| Word | The docx JavaScript library, tokenizing your Markdown via marked and walking the token tree to build a real Word XML document |
Opens a new tab with the rendered Markdown + a print stylesheet, then calls window.print() |
No server roundtrip means exports are instant, don’t count against any quota, and work offline.
The Copy-as-Markdown button
Next to the export menu sits a clone/copy icon. Click it to copy the entire doc as Markdown to your clipboard — same content as the .md download but no file. The toast says Copied document as Markdown.
Useful for pasting into another Markdown tool, a ticket, a chat, or an email — without going through Downloads.
What the print button does
The print icon in the toolbar is a shortcut for PDF (via Print) — same effect as picking that menu item. See Printing.
Format picker
If you’re not sure which format to use:
| You need… | Pick… |
|---|---|
| Lossless source for another Markdown tool | Markdown |
| A file to email someone who’ll edit it in Word | Word |
| A pristine document to print or attach as a PDF | PDF (via Print) → “Save as PDF” |
| Copy a snippet into another doc fast | The Copy-as-Markdown button (clipboard) |
What’s not in v1
| Missing | Notes |
|---|---|
| Bulk export of multiple docs | Export is per-doc |
| Export a folder or library as a single archive | Not in v1 |
| Native PDF generation (without the print dialog) | We rely on the browser’s print → “Save as PDF” path |
| EPUB, HTML, RTF export | Not in v1 |
| Style preset / template selection at export time | Not configurable |