Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Issue with custom decorator not displaying in block content editor after deployment.

3 replies
Last updated: Jan 9, 2024
I added superscript as a custom decorator to my block content editor. I did it with this code
marks: {
  // Decorators usually describe a single property – e.g. a typographic
  // preference or highlighting by editors.
  decorators: [
	{ title: 'Strong', value: 'strong' },
	{ title: 'Emphasis', value: 'em' },
	{ title: 'Code', value: 'code' },
    { title: 'Superscript', 
      value: 'sup', 
      component: (props) => (
        <sup>
          {props.children}
        </sup>
      ),
      icon: () => 'S' 
    },
  ],
When running sanity locally, my custom decorator displays in the block content editor. After pushing my code to production, my custom decorator for sup no longer display in the editor and I get an error "Invalid Portable Text Editor value" because it doesn't recognize "sup". What am I doing wrong? It says "Block with key 'dae3f4812ac2' contains marks (sup) not supported by the current content model.
Jan 9, 2024, 5:00 PM
Please use a single thread when asking for help instead of posting multiple pieces to the main channel.
Jan 9, 2024, 5:15 PM
I hit enter on accident
Jan 9, 2024, 5:22 PM
I figured it out. I needed to do a Sanity deploy
Jan 9, 2024, 5:30 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?