Object of component functions that renders different types of objects that might appear both as part of the blocks array, or as inline objects inside of a block, alongside text spans.
Use the isInline
property to check whether or not this is an inline object or a block
The object has the shape {typeName: ComponentFn}
, where typeName
is the value set
in individual _type
attributes.
Object of component functions that renders different types of marks that might appear in spans.
The object has the shape {markName: ComponentFn}
, where markName
is the value set
in individual _type
attributes, values being stored in the parent blocks markDefs
.
Object of component functions that renders blocks with different style
properties.
The object has the shape {styleName: ComponentFn}
, where styleName
is the value set
in individual style
attributes on blocks.
Can also be set to a single component function, which would handle block styles of any type.
Object of component functions used to render lists of different types (bulleted vs numbered,
for instance, which by default is <ul>
and <ol>
, respectively)
There is no actual "list" node type in the Portable Text specification, but a series of
list item blocks with the same level
and listItem
properties will be grouped into a
virtual one inside of this library.
Can also be set to a single component function, which would handle lists of any type.
Object of component functions used to render different list item styles.
The object has the shape {listItemType: ComponentFn}
, where listItemType
is the value
set in individual listItem
attributes on blocks.
Can also be set to a single component function, which would handle list items of any type.
Component to use for rendering "hard breaks", eg \n
inside of text spans
Will by default render a <br />
. Pass false
to render as-is (\n
)
Used when rendering text nodes to HTML
Component function used when encountering a mark type there is no registered component for
in the components.marks
prop.
Component function used when encountering an object type there is no registered component for
in the components.types
prop.
Component function used when encountering a block style there is no registered component for
in the components.block
prop. Only used if components.block
is an object.
Component function used when encountering a list style there is no registered component for
in the components.list
prop. Only used if components.list
is an object.
Component function used when encountering a list item style there is no registered component for
in the components.listItem
prop. Only used if components.listItem
is an object.
Object definining the different component functions to use for rendering various aspects of Portable Text and user-provided types.