Extends · closed
args.| type Operation tag, always `ReplaceBlock`. | ReplaceBlock | |
| block The complete new state of the block, with attributes inlined at the top level. | ⟨Block⟩ |
ReplaceBlock is the only way content gets into a document. It carries a whole block, never a diff. The daemon keeps a register per block id, and the newest ReplaceBlock by op id is the block's state.
This page defines the change/op/replace-block operation inside a Change body. Its formal schema is attached as the schemaDefinition in this document's metadata, so the app can show it.
block is a block map: id, type, optional text, link and annotations. Any other keys are the block's attributes, inlined at the top level. Older encodings with a nested attributes map are still accepted. A block that is replaced but never positioned by MoveBlocks is a detached block. It is kept, returned by the API, and rendered by the apps outside the main tree, which is how custom navigation is stored. The API reports each block's revision, the CID of the Change whose ReplaceBlock currently defines it. The operation is generic over the block type, so a schema can pin a stricter block model. See Blocks for what goes inside a block.
See also
block: the block this op carries.
MoveBlocks: the op that positions a block.
SetAttributes: document-level metadata.
change/op: all operations.
Blocks: the block model.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime