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

ParameterTypeDescription
htmlstring—
registryRegistry—

Returns

Slice
PropertyTypeDescription
blocksreadonly Node[]—
openStartbooleanThe first block's runs continue the block the caret is in — no boundary before them.
openEndbooleanThe last block stays open: the caret lands inside it and the tail of the split block joins it.