Home · Docs · Import + Export · Export as Markdown (.md)

Export as Markdown (.md)

Lossless Markdown export, same source as on disk. GFM tables, fenced code with language hints, image references by R2 URL, inline HTML for image layout.

Markdown export is the canonical format. It downloads the exact Markdown source we save to the database — every character, every fence, every link reference, in the order you wrote it.

Downloads
kyoto-trip.docx
kyoto-trip.md
report.pdf
# Kyoto, days 1-3

We land in Kyoto on the 12th and have three
full days before Osaka.

- Reserve the dawn slot at Arashiyama.
- Pre-book the Nishiki food tour.

```javascript
const total = perDay * 3
```

How to export

PathWhat happens
Doc toolbar → download iconMarkdown (.md)Browser downloads a file named <title>.md
Doc toolbar → copy iconCopies the same content to your clipboard (no file download)

The download filename is the doc’s title with the standard filename-safe sanitization, plus .md.

What’s in the file

ElementOutput
TitlePrepended as an H1 if your body doesn’t already start with one
Headings# through ###### (level preserved)
Inline marks**bold**, *italic*, ~~strikethrough~~, `code`
Links[text](url) inline format
Lists- for bullets, 1. for ordered, nested with indentation
Blockquotes>
Code blocksTriple-backtick fences with the language hint
TablesGFM pipe tables with the separator row
Horizontal rules---
Images (no width/alignment)![alt](https://r2.sweetdocs.app/u/abc123)
Images (with width or alignment)Inline HTML: <img src="…" width="50%" class="img-align-center" data-align="center" />
Hex color swatchesThe literal #RRGGBB characters (no special encoding)
Comment anchorsInline <span data-comment-id="…">…</span>

Image URLs

Markdown export keeps image references as URLs pointing at our R2 storage — it does not download or embed the image bytes. This means:

If you need the images embedded in the export (for offline reading or for hosting on a different system), use Word export instead — it downloads the binaries.

Image layout via inline HTML

Width and alignment on an image don’t serialize as plain Markdown (the syntax has no slot for them). The serializer detects when an image has either attribute set and emits inline HTML instead:

<img src="https://r2.sweetdocs.app/u/abc123" alt="diagram" width="50%" class="img-align-center" data-align="center" />

This is standard inline HTML allowed by every Markdown spec — other Markdown tools that render embedded HTML will show the image correctly with the layout intact. Tools that strip HTML will still show the image (since the <img> tag is preserved by most stripping rules) just at its natural size.

When to use Markdown export

What’s not in the file

This is by design — Markdown is the body content, not the application state around it.