Skip to main content

Summary

Delete a contiguous range of top-level blocks between two endpoints (inclusive). Both endpoints must be direct children of the document node. Supports dry-run preview.
  • Operation ID: blocks.deleteRange
  • API member path: editor.doc.blocks.deleteRange(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a BlocksDeleteRangeResult with deletedCount, deletedBlocks array (each with ordinal, nodeId, nodeType, textPreview), before/after revision, and dryRun flag.

Input fields

Example request

Output fields

Example response

Pre-apply throws

  • TARGET_NOT_FOUND
  • AMBIGUOUS_TARGET
  • INVALID_TARGET
  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE
  • INTERNAL_ERROR

Non-applied failure codes

  • None

Raw schemas