
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeTo configure inline objects (like an author reference) in Portable Text that appear within the text line rather than as separate blocks, you need to use the of property within the block type definition itself, not at the array level.
The key difference is:
of propertyof propertyHere's how to configure inline objects:
{
title: 'Rich text',
type: 'array',
of: [
{
type: 'block',
// Inline objects go here inside the block definition
of: [
{
type: 'authorReference',
name: 'author',
title: 'Author',
to: [{type: 'author'}]
}
]
}
]
}For the author reference shown in the docs screenshot, you'd define it as an inline object like this:
{
name: 'content',
type: 'array',
of: [
{
type: 'block',
marks: {
decorators: [
{title: 'Strong', value: 'strong'},
{title: 'Emphasis', value: 'em'}
],
annotations: [
// Annotations are also inline but for marking up text
{name: 'link', type: 'object', fields: [{name: 'href', type: 'url'}]}
]
},
// Inline objects that appear as insertable items
of: [
{
type: 'reference',
name: 'author',
title: 'Author Reference',
to: [{type: 'author'}]
}
]
}
]
}As mentioned in the block type documentation, these inline objects are useful for things like footnotes, ticker symbols, or sparklines that need to appear within the flow of text rather than breaking it into separate blocks.
The distinction is crucial:
of: Creates block-level insertions (new lines)of: Creates inline insertions (within text)This is the configuration that allows objects to appear inline with text, as shown in the documentation image you referenced.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store