Skip to content

Editing: by chat & in place

There are two ways to change a Canvas document, and they share the same underlying document — hand-edit a paragraph, then ask the agent to keep going, and neither undoes the other's work.

Editing by chat

The agent edits the document the way a coding agent edits a file: it reads the current content first, then replaces an exact match with new text, leaving everything else untouched.

  • Read before edit. The agent reads the section it's about to change (with real line numbers) rather than working from memory.
  • Surgical edits. edit_canvas replaces one exact match; multi_edit_canvas applies several edits atomically — if one fails to match, the whole set is rejected rather than half-applied.
  • Structural awareness. For long documents the agent can call outline_canvas to get a map of every heading and anchor, and search_canvas to grep for a specific section before reading it.

In practice this means "change the wording of section 3" won't silently touch the parts you already approved.

Editing in place

You don't have to go through chat for a small text fix. Use the toolbox in the bottom-right of the artifact view:

  • Select element — click any part of the document to send it to the chat as context, so your next message refers to exactly that piece.
  • Edit text — double-click any text element to edit it in place, like a WYSIWYG document editor. Changes save automatically as you type; press Escape to cancel, or click away to commit.

Direct edits and agent edits write to the same document, so you can hand-fix a typo mid-stream while the agent is still working on the rest.

Keeping long documents coherent

When a document grows large, the agent can't safely rewrite it from memory — so Canvas gives it the same navigational tools a code editor gives you:

ToolWhat it does
read_canvasRead the document with line numbers, with offset/limit windows
search_canvasGrep the document for a literal string or regex
outline_canvasGet a map of every heading and anchor with line numbers
todo_write / todo_readPlan and track sections across a long build

For a document that's too big to dump into context, the agent narrows down to the right section with outline_canvas + search_canvas before reading — the same discipline it would use on a large code file.

Next steps

Built by Maxrall, Inc.