How to add Superscript tag to a Richtext field?

For the Richtext field type, I currently don’t see any way to add an HTML “sup” (superscript) tag. Is there any way now to wrap Richtext field content in a sup tag? Maybe there is a way to add superscript as an option to the Richtext field toolbar?

Here is the work around I currently have in place:
For my Richtext fields, I added “superscript” to the list of CSS class options. And, I updated my rich text resolver code to wrap text in a sup tag if it is styled and includes a CSS class name “superscript”. To use it while authoring, I select the text that should be wrapped in a sup tag, then use the style button on the Richtext field tool bar to apply the superscript style.

Hello Ed,

yes that is the correct way to solve that at the moment. There is also a ticket on Github which asks for making more HTML tags available in the Richtext editor:

You can give it a thumb up if you like it or leave a comment below it to add information to the ticket.

1 Like