Home · Docs · Import + Export · Importing other formats

Importing other formats

Markdown, plain text, and RTF imports. Each has a small, specific pipeline. This page is the one-shot reference.

Beyond Word and PDF, sweetdocs supports three smaller formats. Each one has a straightforward pipeline.

.md / .markdown

The path of least resistance: the file is read as text and used as-is as the new document’s body.

AspectBehavior
ConversionNone — the bytes become the doc
EncodingUTF-8 expected; UTF-16 also accepted via the browser’s FileReader.readAsText
FrontmatterNot stripped — YAML frontmatter at the top stays in the body
Images referenced as remote URLsStay as-is (no re-upload) — they render via the URL each time the doc opens
Images referenced by relative pathThe path stays as-is; the image won’t load unless the path matches our R2 storage

Markdown imports are the lossless path. Use this when migrating from another Markdown-based tool: export your docs as .md, drop them in, every Markdown construct that sweetdocs supports (see Markdown essentials) round-trips perfectly.

.txt

Plain text. The file becomes the document body verbatim.

AspectBehavior
ConversionNone — content used as-is
EncodingUTF-8 expected
Line breaksPreserved literally
Markdown shortcutsDon’t trigger — pasted/imported text isn’t subject to the live # → heading transforms

If your .txt has Markdown-style syntax in it, it’ll still render correctly the first time you open the doc, because the Edit-mode Tiptap parser sees the #, *, etc. as Markdown. But you can also leave it as plain text — there’s no auto-detection.

.rtf

RTF (Rich Text Format) goes server-side via /api/ai/convert-rtf, where Gemini converts the RTF source to clean Markdown.

Why an LLM and not a parser? Word’s RTF dialect has too many edge cases — every version of Word, Pages, and TextEdit emits slightly different RTF. A hand-rolled parser would be brittle. Sending the source to an LLM gives much better output at a low marginal cost per file.

AspectBehavior
ConversionServer-side via Gemini
AuthRequired (you must be signed in)
QuotaCounts against the AI quota (same as AI Author)
SpeedTypically a couple of seconds per file
What’s preservedHeadings, bold/italic, lists, tables, links, paragraphs — same fidelity profile as Word import
What’s droppedEmbedded objects (OLE), images embedded in RTF (rare; usually external paths), exotic style attributes

For RTF files that are just prose, the import quality is high. For RTF files that are de facto Word docs saved in RTF, consider saving as .docx and using the Word import path instead — Word’s structure is preserved more cleanly there.

What’s not supported

Formats we don’t accept in v1:

ExtensionWhy
.doc (legacy Word, pre-2007)The binary format. Save as .docx first.
.odt (OpenDocument)Not in v1. Export from your editor as .docx or .md.
.pages (Apple Pages)Not in v1. Export as .docx or .pdf.
.epubNot in v1.
.html / .htm filesNot in v1. The closest path is to open the file in a browser and use the paste-from-web flow.
.numbers, .xlsx, .csvNot in v1 — sweetdocs doesn’t have a spreadsheet model.

The accept attribute on the file picker is intentionally narrow (.md,.markdown,.txt,.docx,.rtf,.pdf) so picking an unsupported file fails fast.