htmlToBlocks
htmlToBlocks(
html
,schemaType
,options
):Omit
<TypedObject
|PortableTextTextBlock
<TypedObject
|PortableTextSpan
>,"_key"
> &object
[]
Defined in: block-tools/src/index.ts:17
Convert HTML to blocks respecting the block content type’s schema
Parameters
Section titled “Parameters”string
The HTML to convert to blocks
schemaType
Section titled “schemaType”A compiled version of the schema type for the block content
ArraySchemaType
<unknown
> | Schema
options
Section titled “options”Options for deserializing HTML to blocks
Returns
Section titled “Returns”Omit
<TypedObject
| PortableTextTextBlock
<TypedObject
| PortableTextSpan
>, "_key"
> & object
[]
Array of blocks