Contentful logo

Contentful Community

Superscript and subscript

How can I add superscript for citations to my text?

If you are talking about markdown long text fields then just write out the html tags like so:

- This is some <sup>superscript</sup> text.
- This is some <sub>subscript</sub> text.

And this will create an unordered list with superscript and subscript.

If you are talking about a rich text field, then create a separate Styled Text content type with 2 fields:

  • Text - this is a short text field to hold the actual text
  • Styling - this is a short text field with predefined values of superscript and subscript as a validation and a dropdown appearance

Then you can embed a Styled Text entry inline in your rich text field. On the front end you’d need to write a custom renderer for the EMBEDDED_ENTRY

See these links for more details and examples:

Hi Charlie, it would be great if that would be part of the formatting options in the rich text field.

Do you have plans to add that?


+1. Sub and Superscript is something I’ve requested for the rich text as well.