fn
moveBefore
testedThe 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
| Parameter | Type | Description |
|---|---|---|
content | readonly Node[] | — |
ids | readonly string[] | — |
toIndex | number | — |
Returns
readonly Node[]