@portabletext/types - v2.0.15
    Preparing search index...

    Interface PortableTextListItemBlock<M, C, S, L>

    Strictly speaking the same as a portable text block, but listItem is required

    interface PortableTextListItemBlock<
        M extends PortableTextMarkDefinition = PortableTextMarkDefinition,
        C extends TypedObject = PortableTextSpan,
        S extends string = PortableTextBlockStyle,
        L extends string = PortableTextListItemType,
    > {
        _type: string;
        children: C[];
        listItem: L;
        _key?: string;
        markDefs?: M[];
        style?: S;
        level?: number;
    }

    Type Parameters

    Hierarchy

    Index

    Properties

    _type: string

    Type name identifying this as a portable text block. All items within a portable text array should have a _type property.

    Usually 'block', but can be customized to other values

    children: C[]

    Array of inline items for this block. Usually contain text spans, but can be configured to include inline objects of other types as well.

    listItem: L
    _key?: string

    A key that identifies this block uniquely within the parent array. Used to more easily address the block when editing collaboratively, but is also very useful for keys inside of React and other rendering frameworks that can use keys to optimize operations.

    markDefs?: M[]

    Array of mark definitions used in child text spans. By having them be on the block level, the same mark definition can be reused for multiple text spans, which is often the case with nested marks.

    style?: S

    Visual style of the block Common values: 'normal', 'blockquote', 'h1'...'h6'

    level?: number

    If this block is a list item, identifies which level of nesting it belongs within