Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Subscript and Superscript inTinyMCE

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

Page: 1
Go to End
Author Topic: 365 Views
  • Steeloctopus
    Community Member
    4 Posts

    Subscript and Superscript inTinyMCE Link to this post

    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.


  • RyanTanger
    Community Member
    1 Post

    Re: Subscript and Superscript inTinyMCE Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.