Replace Page Json
replace_page_jsonReplace a Docmost page body with ProseMirror JSON to keep rich formatting, tables, columns, mentions, and comments; validate against the editor schema and preview changes with dry-run.
Instructions
Replace a whole page body with a ProseMirror JSON document, as get_page with format='json' returns it. Unlike Markdown this keeps everything Docmost can show: colors, merged table cells, columns, diagrams, mentions, comment highlights. Read the page as JSON first, change it and send the complete document. It is checked against Docmost's editor schema before anything is written, refused while someone else is editing the page, and the previous body is saved as a snapshot. With dry_run=true nothing is written; the result lists any problems and shows the change as a Markdown diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Page id, slug id or Docmost page URL. | |
| dry_run | No | Only show the change as a diff; write nothing. | |
| document | Yes | The ProseMirror document: {'type': 'doc', 'content': [...]}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||