Exporting: overview

One export menu in the toolbar: Copy as Markdown, three download formats (Markdown, Word, PDF), and Print. All client-side, no server roundtrip.

3 min read

Exporting in sweetdocs is a one-click affair. The download icon in the doc toolbar opens one small menu: Copy as Markdown, three download formats, and Print….

kyoto-trip Editing

The export menu

FormatWhat it doesArticle
Markdown (.md)Verbatim Markdown source as a downloadable fileExport as Markdown
Word (.docx)Real Word document: headings, lists, tables, embedded imagesExport as Word
PDF (.pdf)Downloads a real PDF with selectable text, tables, and listsExport as PDF
Print…Opens the browser print dialog with a clean stylesheetPrinting

The menu is on Markdown docs only (the SVG editor is a different surface). Its first item, Copy as Markdown, copies the whole doc 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 .docx so 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:

FormatEngine
MarkdownA Blob with the doc’s content, downloaded via a hidden <a download>
WordThe docx JavaScript library, tokenizing your Markdown via marked and walking the token tree to build a real Word XML document
PDFOpens 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.

Copy as Markdown

Copy as Markdown is the first item in the export menu. 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 Print does

Print…, the last item in the export menu, opens the browser print dialog with the same clean print stylesheet. See Printing.

Format picker

If you’re not sure which format to use:

You need…Pick…
Lossless source for another Markdown toolMarkdown
A file to email someone who’ll edit it in WordWord
A PDF to attach or archivePDF (.pdf)
Copy a snippet into another doc fastCopy as Markdown in the export menu (clipboard)

What’s not in v1

MissingNotes
Bulk export of multiple docsExport is per-doc
Export a folder or library as a single archiveNot in v1
Native PDF generation (without the print dialog)We rely on the browser’s print → “Save as PDF” path
EPUB, HTML, RTF exportNot in v1
Style preset / template selection at export timeNot configurable