Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Changing format styles text in tinyMCE toolbar

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1787 Views
  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Changing format styles text in tinyMCE toolbar Link to this post

    Hi, I am trying to change the text that shows up in the format select box in the html editor (paragraph, h1, h2 etc) to make it clearer to the client what they should be using for sub headings etc. I have made the following change to HtmlEditorField_Toolbar:

    new HtmlEditorField_dropdown("FormatBlock", "formatSelect", array(
                "<p>" => _t('HtmlEditorField.FORMATP', "Normal Paragraph", PR_MEDIUM, '<p> tag'),
                "<h2>" => _t('HtmlEditorField.FORMATH2', "Main Page Heading", PR_MEDIUM, '<h2> tag'),
                "<h3>" => _t('HtmlEditorField.FORMATH3', "Sub Heading", PR_MEDIUM, '<h3> tag'),
                "<h5>" => _t('HtmlEditorField.FORMATH5', "Gold heading style", PR_MEDIUM, '<h5> tag'),
                
             )),

    but I still get 'Paragraph', 'Heading 1', 'Heading 2' in the dropdown.

    Any ideas out there on how to sort this?

  • JGC
    Avatar
    Community Member
    25 Posts

    Re: Changing format styles text in tinyMCE toolbar Link to this post

    The text you've changed is what it falls back to if it can't find anything in the lang\en_US file (or whichever language file it's using).

    Change 'sapphire/lang/en_US.php' to match the changes you want. Starts on line 243 I think.

    1787 Views
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.