fn

moveBlocks

tested

Move a set of blocks so they sit, in document order, before the block that currently occupies toIndex (content.length means "at the end"). One transaction, one undo entry; a drop that changes nothing is refused.

Signature

ts
export function moveBlocks(ids: readonly string[], toIndex: number): Command{ ... }

Parameters

ParameterTypeDescription
idsreadonly string[]—
toIndexnumber—

Returns

Command