@portabletext/toolkit - v3.0.1
    Preparing search index...

    Interface ToolkitNestedPortableTextSpan<M>

    Toolkit-specific type representing a portable text span that can hold other spans. In this type, each span only has a single mark, instead of an array of them.

    interface ToolkitNestedPortableTextSpan<
        M extends PortableTextMarkDefinition = PortableTextMarkDefinition,
    > {
        _type: "@span";
        markType: string;
        children: (
            | ToolkitTextNode
            | ToolkitNestedPortableTextSpan<PortableTextMarkDefinition>
            | ArbitraryTypedObject
        )[];
        _key?: string;
        markDef?: M;
        markKey?: string;
    }

    Type Parameters

    • M extends PortableTextMarkDefinition = PortableTextMarkDefinition
    Index

    Properties

    _type: "@span"

    Type name, prefixed with @ to signal that this is a toolkit-specific node.

    markType: string

    Type of the mark. For annotations, this is the _type property of the value. For decorators, it will hold the name of the decorator (strong, em or similar).

    children: (
        | ToolkitTextNode
        | ToolkitNestedPortableTextSpan<PortableTextMarkDefinition>
        | ArbitraryTypedObject
    )[]

    Child nodes of this span. Can be toolkit-specific text nodes, nested spans or any inline object type.

    _key?: string

    Unique key for this span

    markDef?: M

    Holds the value (definition) of the mark in the case of annotations. undefined if the mark is a decorator (strong, em or similar).

    markKey?: string

    The key of the mark definition (in the case of annotations). undefined if the mark is a decorator (strong, em or similar).