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

Customize Tiny MCE

Go to End

9 Posts   6122 Views


Community Member, 11 Posts

23 April 2008 at 11:26am

i want to add some buttons to the backend editor "Tiny MCE"?! How can I do that - I tried to edit "tinymce.template.js", but without success.

Is it impossible to add for example the "select class" drop down menu?!

so long BerT


Administrator, 690 Posts

23 April 2008 at 1:51pm

The toolbar spec is defined in sapphire/forms/HtmlEditorField.php - there's a class HtmlEditorField_Toolbar.


Community Member, 8 Posts

26 April 2008 at 12:24am

is it possible to override this class / function without editing core-elements making ugrading harder?


Administrator, 690 Posts

27 April 2008 at 10:28am

Yes, you can, but it will require a fair bit of mucking around:

1) Apply this changeset to your own copy. This will appear in the next version, so you're not distrupting upgradeability.

2) Create MyToolbar.php. Overload any methods that you need to:

class MyToolbar extends HtmlEditorField_Toolbar {


3) Add the following to _config.php:

Object::useCustomClass("HtmlEditorField_Toolbar", "MyToolbar");

If someone wants to write a patch that defines methods such as these, that would be handy.

HtmlEditorField_Toolbar::add_control($control, $row, $insertBefore = null);

You would then be able to use these methods to amend the toolbar without creating a new class.


Community Member, 46 Posts

9 July 2008 at 11:03am

Hi Sam

So is this in v2.2.2?


Administrator, 690 Posts

14 July 2008 at 6:10pm

Those last 3 methods don't currently exist, it's a feature suggestion for anyone who wants to implement them.


Community Member, 6 Posts

22 July 2008 at 4:52am

Hello simple question i just want the font color and background color buttons on tinymce can you give me the lines that I should add to htmleditorfiled.php file please !!! thanks in advance.


Community Member, 11 Posts

22 July 2008 at 7:43am

It seems to me, that it does not work anymore in SIlverstripe 2.2.2

Any ideas, bugfixes?

Go to Top