Interface PortableTextSpan

A Portable Text Span holds a chunk of the actual text value of a Portable Text Block

interface PortableTextSpan {
    _type: "span";
    text: string;
    _key?: string;
    marks?: string[];
}

Properties

Properties

_type: "span"

Type is always span for portable text spans, as these don't vary in shape

text: string

The actual text value of this text span

_key?: string

Unique (within parent block) key for this portable text span

marks?: string[]

An array of marks this text span is annotated with, identified by its _key. If the key cannot be found in the parent blocks mark definition, the mark is assumed to be a decorator (a simpler mark without any properties - for instance strong or em)