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

    Interface PortableTextMarkComponentOptions<M>

    Options received by Portable Text mark components

    interface PortableTextMarkComponentOptions<
        M extends TypedObject = ArbitraryTypedObject,
    > {
        text: string;
        markType: string;
        children: string;
        renderNode: NodeRenderer;
        value?: M;
        markKey?: string;
    }

    Type Parameters

    • M extends TypedObject = ArbitraryTypedObject

      Shape describing the data associated with this mark, if it is an annotation

    Index

    Properties

    text: string

    Text content of this mark

    markType: string

    Type of mark - ie value of _type in the case of annotations, or the name of the decorator otherwise - eg em, italic.

    children: string

    Serialized HTML of child nodes of this mark

    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.

    value?: M

    Mark definition, eg the actual data of the annotation. If the mark is a simple decorator, this will be undefined

    markKey?: string

    Key for this mark. The same key can be used amongst multiple text spans within the same block, so don't rely on this to be unique.