# Edit and export documents

> Keep a document’s Markdown source, co-edit with people, review versions and export it.

Kind: guide · ~3 min · Verified v0.237.0 · Next: [Get feedback](https://pr-2379-stg.superartifacts.app/docs/comments.md)

## Goal

Co-edit with an agent.

## What you'll have

Stored source, versions and exports.

## Needs

Draft + connected agent. Owners/Editors co-edit; Commenters comment. Cap: 400,000 characters.

## Prompt

**Publish a document we can revise.** Publish privately with Markdown source.

```prompt
Publish my draft as a source-backed Super Artifacts document. Ask for the draft, slug and reviewers. Read superartifacts://guide/start and markdown-viewer with super_templates; publish with super_publish using template: {slug: "markdown-viewer"}, values: {document: {markdown: the draft}} and visibility: "private". Keep it private with super_artifact_set. Return the link and explain Owner/Editor co-editing, Save and Export. Ask before sharing. Before revising, read _source.md with super_artifacts, keep the same workspace slug, use document.baseVersion for the saved version read, and report any merge conflicts instead of claiming every requested change landed.
```

```mermaid
flowchart TD
  A[Publish Markdown] --> B[Co-edit source]
  B --> C[Save version]
  C --> D[Review or export]
```

## Steps

1. Read markdown-viewer with `super_templates`; `super_publish` privately with `document.markdown`. Markdown as `html` is refused (`looks_like_markdown`).
2. Owners/Editors use **Edit**; the room is separate from form answers. Limits: twenty editors per document; three open documents on Free, twenty on paid plans.
3. **Save** a ready revision. Autosave: thirty idle seconds or five continuous minutes, capped at thirty versions/hour. Explicit Save remains available.
4. Before revising, read `_source.md` with `super_artifacts`. Without a version it may return room text (`fromRoom: true`); with one, saved text. Republish to the same slug with `document.baseVersion`.
5. **Versions → Diff** compares source-backed revisions. Overlapping edits preserve the person’s conflicting lines; review before resolving.

## Check it worked

Change different lines in two editor sessions, save, and confirm both changes in the source.

## If not

Missing Edit/Export: check permissions and stored source; HTML publishing creates none. Agent reads stop at 300,000 bytes; export keeps saved source. For `source_changed`, read again. Failed save: keep the editor open and copy your draft.

## Variations

Use the [Markdown template](https://pr-2379-stg.superartifacts.app/docs/markdown-template.md) for block syntax and [Markdown forms](https://pr-2379-stg.superartifacts.app/docs/markdown-forms.md) for autosaved answers.

**Page** (phone default) edits paragraphs, headings, lists, table cells and code.
Done/blur commits; Escape cancels. Undo uses room history. Unsupported formatting
opens **Edit source**. Conflicts keep your draft: copy it before returning to Write. Page unavailable: use Write.

**Export**: title menu or **Share → Export**. Readers get stored Markdown; Owners/Editors also get Word and server-rendered PDF. HTML requires bundle-download permission or manager access. Non-documents use Markdown conversion and browser-print PDF.

Word keeps supported structure, rich blocks and media links/posters. Missing images become links; unsupported maths/diagrams keep source. PDF: first 200 pages. Renderer unavailable: take source.

**Navigation.** From two headings: a floating contents pill at every width. Arrows change sections; title opens contents and Back to top. Configure `toc`/`tocDepth`.

**Listen.** Below the title: whole-document local voices. The one-line player has play/pause, paragraph skips, progress, speed, settings and Close. Settings selects voice/speed. Resume restarts the sentence. Editing/print stop speech; backgrounding pauses. No motion for reduced motion, tiles or print.

Save before export. Unpublished versions: owner-only. JSON: Data.

[Sign](https://pr-2379-stg.superartifacts.app/docs/signatures.md) after editing: signatures pin that version.

## Next

[Comments](https://pr-2379-stg.superartifacts.app/docs/comments.md), [versions](https://pr-2379-stg.superartifacts.app/docs/concepts/versions.md) and [limits](https://pr-2379-stg.superartifacts.app/docs/reference/limits.md).
