Add Text Alignment Options to Structured Text Editor

Currently, the structured text editor does not support text alignment options, meaning users are unable to center or right-align text sections. This limitation restricts formatting flexibility, making it challenging to create well-structured content with different text alignments.

Adding text alignment options (left, center, right) would significantly improve the editor’s capabilities, offering more control over content presentation. This feature would benefit content creators by allowing them to match the design needs of their pages more effectively.

Would it be possible to introduce this enhancement in a future update?

Hey @damiano.desantos,

Welcome to the forum, and thanks for the suggestion! Please remember to vote on it on the upper left.

I agree that this would be a useful addition to the structured text editor, and I hope that it gets added at some point — it typically depends on the popularity of a request.

In the meantime, a couple workarounds:

(Easy)
If you don’t need the full power of structured text, you can use a HTML field instead, which has that option:

(Harder)
If you do need structured text, you can also (with a bit of effort and coding) create a custom node style for this:
https://www.datocms.com/docs/plugin-sdk/structured-text-customizations#adding-custom-styles-to-nodes

But that would change how it looks only in the DatoCMS UI. On your visitor-facing frontend, you would also need to create a corresponding custom renderer: https://github.com/datocms/react-datocms/blob/master/docs/structured-text.md#custom-renderers-for-inline-records-blocks-and-links

Let me know if you need an example for either approach.