Skip to main content

Summary

Delete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode.
  • Operation ID: delete
  • API member path: editor.doc.delete(...)
  • Mutates document: yes
  • Idempotency: conditional
  • Supports tracked mode: yes
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a TextMutationReceipt with applied status; receipt reports NO_OP if the target range is collapsed or empty.

Input fields

Variant 1 (target.kind=“selection”)

Variant 2 (required: ref)

Example request

Output fields

Variant 1 (success=true)

Variant 2 (success=false)

Example response

Pre-apply throws

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • INVALID_TARGET
  • INVALID_INPUT
  • STORY_NOT_FOUND
  • STORY_MISMATCH
  • STORY_NOT_SUPPORTED
  • CROSS_STORY_PLAN
  • MATERIALIZATION_FAILED

Non-applied failure codes

  • NO_OP

Raw schemas