sanity
sanity copied to clipboard
Portable Text - Multiple custom annotations are not editable separately
Describe the bug
It is not possible to edit the options for each annotation separately when selecting multiple custom annotations to a text in a Portable Text component.
To Reproduce
- Make sure you have installed
sanity install @sanity/color-input - Create this schema for a custom component:
export default {
title: 'Body text',
name: 'body',
type: 'array',
of: [
{
type: 'block',
lists: [],
marks: {
decorators: [],
annotations: [
{
name: 'externalLink',
type: 'object',
title: 'External link',
fields: [
{
name: 'href',
type: 'url',
title: 'Href',
},
],
},
{ name: 'color', title: 'Color', type: 'color' }
],
},
styles: [
{ title: 'Normal', value: 'normal' },
{ title: 'H2', value: 'h2' },
{ title: 'H3', value: 'h3' },
],
},
],
};
- Add the component as a field in a document
- Write some text in the field
- Select the text and add an external link.
- Select the same text and select a color.
Expected behavior
Being able to edit each annotation type separately. Maybe adding all options in the tooltip suggestion (see image) that pops up when selecting the text?
Screenshots

Which versions of Sanity are you using?
@sanity/cli 2.22.0 (up to date)
@sanity/base 2.22.0 (up to date)
@sanity/color-input 2.22.0 (up to date)
@sanity/core 2.22.0 (up to date)
@sanity/default-layout 2.22.0 (up to date)
@sanity/default-login 2.22.0 (up to date)
@sanity/desk-tool 2.22.2 (up to date)
@sanity/production-preview 2.15.0 (up to date)
@sanity/vision 2.22.0 (up to date)
What operating system are you using?
N/A
Which versions of Node.js / npm are you running?
8.1.4
v17.1.0
Additional context
N/A
Security issue?
No.
@phmasek - thank you for reporting this issue. It's on our radar, overlapping annotations support is something we want too.
Any update on this feature? Would be great if this is possible 👍
+1
+1
Has there been any update on this? Have just come across a use case where this would be ideal!
Hi!
We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.
We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the slack community.