Skip to content

findBlockPathById

function findBlockPathById(doc, id): BlockPath | null;

Defined in: invert.ts:32

Depth-first search for the block carrying id, returning its BlockPath (or null). Block ids are stable across an op, so this is how the inverse of a moveBlock recovers where the moved block actually landed in the post-state regardless of index arithmetic.

ParameterType
docDocumentNode
idstring

BlockPath | null