Skip to main content

Scope

Workspace documents in Web appear as Tuturuuu Docs. Routes stay under /[wsId]/documents, access still requires workspace membership and manage_documents, and content remains TipTap JSON in workspace_documents.content. Public document pages and other apps are unchanged. The list filters by name through ?search=, matching the typed text literally rather than as SQL wildcards.

Markdown export

The editor actions menu exports the live editor content as GitHub Flavored Markdown (.md, file named from the doc title). Headings, paragraphs, hard breaks, bold, italic, strikethrough, inline code, links, bullet, ordered and task lists, blockquotes, fenced code with language, rules, tables and images are exported. Plain text is escaped so it re-imports as literal text. Marks without a GFM form (underline, highlight, color, sub/superscript) export as plain text, toggles export as a bold summary followed by their content, and citations export as their fallback text. Any GFM renderer, including the wiki renderer, shows the same result.

Markdown import

A .md, .markdown or .txt file of at most 1 MiB can be imported:
  • From the Docs list, through the Import button or by dropping the file on the list. A new doc is created, named after its first level-one heading or else the file name.
  • From an open doc, through the actions menu. An in-app confirmation precedes replacing the current content, which then saves through normal autosave.
Import never stores HTML. Raw HTML is reduced to its visible text, and script, style, iframe, object, embed, template, SVG and MathML elements are dropped with their contents. Links keep only http(s), mailto, same-origin paths and fragments; images keep only http(s) and same-origin paths. Anything else keeps its text and loses the URL. Imported image URLs are referenced as-is, not copied into workspace storage.

Paste and print

Pasting plain text that looks like Markdown, with no semantic rich HTML on the clipboard, converts it to rich content through the shared editor’s Markdown paste extension; other pastes keep normal behavior. Print uses the browser print window. The print stylesheet hides app chrome and editor toolbars, prints the doc title and content in light colors with page margins, and avoids page breaks inside headings, code blocks, quotes, images and table rows. Saving as PDF uses the browser’s print destination.

Regression coverage

Codec, sanitization and round-trip tests are in apps/web/src/lib/documents/markdown/*.test.ts. Source tests do not establish browser acceptance; render the list and editor at 390px and 1440px in both themes, and check print preview, before release.