fn
createSlice
testedSignature
ts
export function createSlice(blocks: readonly Node[], openStart = false, openEnd = false): Slice{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
blocks | readonly Node[] | — |
openStart? | boolean | — |
openEnd? | boolean | — |
Returns
Slice| Property | Type | Description |
|---|---|---|
blocks | readonly Node[] | — |
openStart | boolean | The first block's runs continue the block the caret is in — no boundary before them. |
openEnd | boolean | The last block stays open: the caret lands inside it and the tail of the split block joins it. |