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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2387 Views

Avatar
NickJacobs

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?

Avatar
JGC

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.