Home · Docs · Import + Export · Pasting from the web

Pasting from the web

Copy from a webpage, Word, Google Docs, or your code editor. Sweetdocs picks the best clipboard format, preserves structure, and normalizes the result to Markdown.

When you paste into a sweetdocs document, the editor inspects the clipboard, picks the highest-fidelity format available, and converts the result to live Markdown. This page covers what to expect from each source you might paste from.

en.wikipedia.org/wiki/Markdown

Markdown

Markdown is a lightweight markup language for creating formatted text using a plain-text editor.

  • Headers (lines starting with #)
  • Lists (- or 1.)
  • Emphasis (*italic* or **bold**)

See also: John Gruber, CommonMark.

notes.md — sweetdocs

Markdown

Markdown is a lightweight markup language for creating formatted text using a plain-text editor.

  • Headers (lines starting with #)
  • Lists (- or 1.)
  • Emphasis (italic or bold)

See also: John Gruber, CommonMark.

The general pipeline

When you paste, three things can happen:

Clipboard contentSweetdocs’s response
Plain text onlyInserted at the cursor as plain text
Plain text + rich HTML (text/html)HTML parsed through the Tiptap schema; structure becomes real Markdown blocks
Plain text + code-editor HTML (<pre> or white-space: pre)The MarkdownPaste extension catches this, re-parses the plain-text payload as Markdown, and inserts the result (so a pasted snippet doesn’t become a single dumb code block)
One or more image filesThe ImagePaste extension uploads each one to our storage and inserts an ![]() (see Adding images)

The choice happens automatically — you just hit ⌘V.

Per-source notes

Wikipedia, news articles, blog posts

Modern web pages emit clean semantic HTML. Headings, paragraphs, lists, links, and most inline marks come through cleanly. Images are kept as URLs — they aren’t uploaded to our storage on paste, so they continue loading from the original host.

What gets stripped:

Word (web or desktop)

Pasting from Word produces structured HTML that the schema parses well. Headings, lists, tables, bold/italic, links all round-trip. Word’s heavy inline styles (font choices, exact spacing) are dropped — Markdown is theme-driven.

For large Word documents, importing the .docx file is more reliable than paste. Word’s clipboard HTML is sometimes truncated or shaped differently than the docx XML.

Google Docs

Similar to Word — structured HTML pastes correctly for headings, lists, tables, and inline marks. Google Docs’s inline images come through as their CDN URLs; consider downloading the Doc as .docx and importing if you need the images stored in your sweetdocs library.

Notion

Notion’s web copy emits clean structured HTML. Headings, paragraphs, callouts (which sweetdocs renders as blockquotes since callouts aren’t supported in v1), code blocks, lists, and tables come through cleanly.

Notion’s databases / inline pages don’t paste meaningfully — they’re internal references.

VS Code, Cursor, JetBrains, terminal

When you copy code from a code editor, the clipboard has both:

The MarkdownPaste extension detects that white-space: pre signature and re-routes through the plain-text path so your code lands as live Markdown (with backticks, headings, etc., still parsed) rather than being trapped in a single code block.

If you do want the pasted content to be a code block, paste it normally and then either:

AI tools (ChatGPT, Claude, Gemini, Perplexity, Copilot)

Treated as rich HTML for the body content. See Pasting from AI tools for the per-tool details.

Image clipboards (screenshots, copied images)

The ImagePaste extension catches image bytes on the clipboard, optimizes them client-side (HEIC transcode, EXIF strip, AVIF re-encode, resize), uploads to our R2 storage, and inserts an ![]() at the cursor. See Adding images.

This works for screenshots taken with your OS shortcut, images copied from a browser, or any application that puts an image on the system clipboard.

What never survives a paste

ThingReason
Embedded interactive widgets (iframes, embeds)Not modeled in the Tiptap schema
Inline videosNot modeled in v1
Web fonts and theme colorsTheme-driven in sweetdocs
JavaScript or onclick handlersStripped defensively
Source-specific UI chrome (avatars, “copy” buttons that appeared in the source)Not in the body content

When paste isn’t enough

For full-document migrations, use the import pipeline instead. Paste is best for partial content (a snippet, an article excerpt, a tablet of data) — imports give better fidelity for entire documents because they go through format-specific converters with image upload built in.