How to make superscript and subscript available

How could I enable content editors to mark certain text ranges as superscript or subscript?

I can’t find an option to enable it in the Rich Text Editor. If not supported by the editor directly, is it possible to annotate text ranges with arbitrary metadata as a workaround?

Hello @ed

I’m not sure if this is the specific type of text field you are talking about, but using a “Multiple Paragraph Text” field, with presentation set to “HTML Editor” you can add both superscript and subscript normally:

You can add it exactly as the link you provided specifies, by accessing the source code option:

There you could add something like this:

Hope this helps!

Thanks, this would work. Right, I forgot to mention that I was looking at the “Structured text” module. Ideally, I want our content editors not to be exposed to Code/HTML text so I’d like to add buttons that transform a text range to superscript or subscript.

Is this possible with DatoCMS? Would I have to fall back to developing my own plugin for this?

(I’m not super familiar with DatoCMS yet, I’m just doing a comparison of it to others such as Sanity and Contentful to decide what solution works for our company best)

If you want to spare your editors from being exposed directly to the HTML we have a plugin that allows you to customize the options of your rich text editor according to your needs, using the TinyMCE editor: