← All playbooks · Raw API

task-edit-rich-text

# Capability: Edit rich text

## Intent phrases

- edit body copy
- update a paragraph
- change rich text content

## Requires capabilities

Always available.

## Prerequisites

- Open session on the target page or article
- `snapshot` to locate RTF fields on `@ref` nodes

## Steps

1. `cms_edit ["open", "--page-slug", "<slug>"]`
2. `cms_edit ["snapshot"]`
3. `cms_edit ["read", "@cN", "body"]` — inspect RTF field name
4. `cms_edit ["rtf", "@cN", "body", "--content", "<markdown or plain>"]`
5. `cms_edit ["diff"]`
6. `cms_edit ["save"]`

For partial updates within one RTF field:

```
cms_edit ["rtf", "replace", "@cN", "body", "--find", "old text", "--replace-plain", "new text"]
```

## Confirmation gates

1. Identify the `@ref` and field before editing
2. Show `diff` before `save`

## Out of scope

- Publish

## Related resources

- `cms-edit://customer/components-index`