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:

Archive /

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

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

Changing format styles text in tinyMCE toolbar

Go to End

2 Posts   2261 Views


Community Member, 148 Posts

5 November 2008 at 11:12am

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?


Community Member, 25 Posts

5 November 2008 at 10:36pm

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.