fn

moveBefore

tested

The block order after moving ids (in document order) to sit before the block currently at toIndex; content.length means the end. What a drop and moveBlocks agree on, so the indicator never promises a move the command would refuse.

Signature

ts
export function moveBefore(content: readonly Node[], ids: readonly string[], toIndex: number): readonly Node[]{ ... }

Parameters

ParameterTypeDescription
contentreadonly Node[]—
idsreadonly string[]—
toIndexnumber—

Returns

readonly Node[]