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

is there a good solution to center or right align text in the richtext editor?

1 replies
Last updated: Dec 3, 2020
is there a good solution to center or right align text in the richtext editor?
Dec 1, 2020, 5:22 PM
The idea behind Portable Text is that the presentation layer should decide layout. In the original design we assumed that text-alignment was a presentation concern, and didn't include it in the spec. We might reconsider this.
Meanwhile you can make a custom
style
. e.g.
normal+right
 and implement alignment in your frontend with the block serializer.
Dec 3, 2020, 12:40 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?