fn
parseHtmlSlice
Parse clipboard HTML. DOMParser builds an inert document — scripts never
run, images never load — and the walk copies text and marks out of it, so
pasted markup cannot reach the live page at all.
Signature
ts
export function parseHtmlSlice(html: string, registry: Registry): Slice{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
html | string | — |
registry | Registry | — |
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. |