# 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-2374-stg.superartifacts.app/docs/comments.md)

## Goal

Publish a document that people and an agent can revise.

## What you'll have

A stable link, stored Markdown source, versions and exports.

## Needs

A draft and connected publishing agent. Co-editing needs Owner or Editor access; Commenters leave feedback. Maximum: 400,000 characters.

## Prompt

**Publish a document we can revise.** The agent publishes privately through markdown-viewer and keeps the source for later edits.

```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. Ask the agent to read markdown-viewer with `super_templates`, then publish with `super_publish`, filling `document.markdown`. Specify private access. Sending Markdown as `html` is refused with `looks_like_markdown`.
2. As an Owner or Editor, use **Edit** to co-edit the published document. This room is separate from live form answers. Each document admits twenty simultaneous editors; workspaces admit three open documents on Free or twenty on paid plans.
3. **Save** a ready revision. Autosave runs after thirty idle seconds or five minutes of continuous edits, capped at thirty versions an hour. Explicit Save remains available. Check save status before leaving after an error.
4. Before revising, the agent reads `_source.md` through `super_artifacts`: omitting a version may return room text (`fromRoom: true`); specifying one returns saved text. Publish to the same workspace slug, passing the version read as `document.baseVersion` when applicable.
5. Compare source-backed revisions using **Versions → Diff**. Overlapping edits keep the person’s conflicting lines and report the conflict. 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 or Export usually means insufficient permission or no stored source. HTML publishing does not create source. Agent text reads stop at 300,000 bytes; source export keeps the saved source. A `source_changed` refusal means another version landed during the merge; read again before retrying. If saving fails, keep the editor open and copy the draft before closing it.

## Variations

**Export** on the dashboard title bar or **Files** tab offers Markdown, Word and PDF for a Markdown source. Owners and Editors can export; unpublished versions are owner-only. JSON sources offer Data instead of Word. Source export returns the saved version, which can lag unsaved typing.

On a published document, choose **Export** from the title menu or open **Share → Export**. Markdown uses the stored source for anyone who can open the document. Word and server-rendered PDF appear for Owners and Editors. HTML appears when bundle downloads are allowed, or for a manager. Non-document artifacts use Markdown conversion and open the browser’s print dialog for PDF.

Word preserves supported structure; unavailable images become links, and unsupported math or diagrams keep source. PDF is limited to the first 200 pages. A busy or unavailable PDF renderer does not prevent taking the source.

For an agreement, finish the revision before [requesting signatures](https://pr-2374-stg.superartifacts.app/docs/signatures.md). Signing pins that exact version; later edits do not rewrite it.

## Next

[Review comments](https://pr-2374-stg.superartifacts.app/docs/comments.md), [version behavior](https://pr-2374-stg.superartifacts.app/docs/concepts/versions.md) and [document limits](https://pr-2374-stg.superartifacts.app/docs/reference/limits.md).
