Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Subscript and Superscript inTinyMCE

Go to End

2 Posts   2464 Views


Community Member, 5 Posts

14 April 2014 at 5:23pm

Hi I have an out-of-the-box Silverstripe installation and I want to display subscript and superscript buttons on the tinyMCE control.

Unfortunately I can't get the buttons to display not matter what I try. They are definitely supported in tinyMCE but for some reason these buttons have been remove from the default installation and are not showing up on the Silverstripe tinyMCE instance.

Can any body tell me why these are not there and what I can do to display these controls.



Community Member, 2 Posts

19 June 2014 at 5:07pm

Hey Steeloctopus,

In order to add the buttons to the TinyMCE bar, add this code to your _config.php:

HtmlEditorConfig::get('cms')->addButtonsToLine(2, 'sub', 'sup', 'separator');

This results in the Subscript and Superscript html elements ('sub' and 'script' arguments relatively) being added to the second line of the bar, and then adds a separator. I'm not 100% as to whether this works with SS < 3.1.x, as I've only used it on that.