@portabletext/to-html - v3.0.0
    Preparing search index...

    Interface PortableTextComponentOptions<T>

    Options received by most Portable Text components

    interface PortableTextComponentOptions<T> {
        value: T;
        index: number;
        isInline: boolean;
        renderNode: NodeRenderer;
        children?: string;
    }

    Type Parameters

    • T

      Type of data this component will receive in its value property

    Index

    Properties

    value: T

    Data associated with this portable text node, eg the raw JSON value of a block/type

    index: number

    Index within its parent

    isInline: boolean

    Whether or not this node is "inline" - ie as a child of a text block, alongside text spans, or a block in and of itself.

    renderNode: NodeRenderer

    Function used to render any node that might appear in a portable text array or block, including virtual "toolkit"-nodes like lists and nested spans. You will rarely need to use this.

    children?: string

    Serialized HTML of child nodes of this block/type