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

## Goal

Publish a readable document that people and an agent can revise together.

## What you'll have

An artifact with 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. Open the published document. As an Owner or Editor, use **Edit** to type alongside other editors. This is a text co-editing room, separate from a live room for form answers. A document admits twenty simultaneous editors; a workspace can open three documents on Free or twenty on paid plans.
3. Use **Save** when a revision is ready. Autosave also runs after thirty seconds without typing or five minutes of continuous edits. Autosave is capped at thirty versions an hour; explicit Save remains available. Watch the save status before leaving after an error.
4. Before an agent revises, have it read `_source.md` through `super_artifacts`. Without a version, it can receive the open room’s current text, marked `fromRoom: true`; with a version, it receives that saved version. Publish to the same workspace slug and pass the version read as `document.baseVersion` when applicable.
5. Open **Versions** to compare source-backed revisions with **Diff**. When human and agent changes overlap, the merge keeps the person’s conflicting lines and reports the conflict. Read the result before calling it resolved.

## Check it worked

Change different lines in two editor sessions and save. Confirm both changes in the saved source before another revision.

## If not

No Edit or Export usually means insufficient permission or a version with no stored source. Publishing arbitrary HTML does not create source automatically. 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.

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-2197-stg.superartifacts.app/docs/signatures.md). Signing pins that exact version; later edits do not rewrite it.

## Next

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