Rich text / foldkit-richtext

RelocateStep

interface · packages/richtext/src/transaction.ts:298

interface RelocateStep {
  readonly node: NodeId
  readonly into: NodeId
  readonly at: number
  readonly base: number
}

Merge relocation: offsets >= at move to into with base + offset - at; lower offsets stay. Affinity is preserved, not consulted: the source location ceases to exist, so every endpoint must move.

In the guides

Members

RelocateStep.node

property · packages/richtext/src/transaction.ts:299

readonly node: NodeId

RelocateStep.into

property · packages/richtext/src/transaction.ts:300

readonly into: NodeId

RelocateStep.at

property · packages/richtext/src/transaction.ts:301

readonly at: number

RelocateStep.base

property · packages/richtext/src/transaction.ts:302

readonly base: number