Parameters
- block:
| PortableTextBlock<
PortableTextMarkDefinition,
PortableTextSpan
| ArbitraryTypedObject,
string,
string,
>
| ArbitraryTypedObject[]
| PortableTextBlock<
PortableTextMarkDefinition,
PortableTextSpan
| ArbitraryTypedObject,
string,
string,
>[]
Returns string
The plain-text content of the blocks
Takes a Portable Text block (or an array of them) and returns the text value of all the Portable Text span nodes. Adds whitespace when encountering inline, non-span nodes to ensure text flow is optimal.
Note that this only accounts for regular Portable Text blocks - any text inside custom content types are not included in the output.