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.

Archive /

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

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

Config the tinyMCE?


Reply


2 Posts   1020 Views

Avatar
raum18

Community Member, 1 Post

2 July 2008 at 3:37am

Hello,
i have to add some buttons to the editor tinyMCE! How can I do that - I tried this:

-----------------------------------------------------------------------
--> Sam / 27 April 2008 at 10:28am / Core Development Team / Re: Customize Tiny MCE:

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

http://open.silverstripe.com/changeset/53459/modules/cms/trunk/code/LeftAndMain.php

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");
-----------------------------------------------------------------------

and it works so far, but not with all button-typs.

So i have problems with implement Forecolor, Backcolor, Selectclass drop down menu, Selectfont drop down menu, ... and so on.

Is it possible to get an example or a patch to fix this problem?
It is possibel to implement the full tiny-toolbar?
In this project the use of Silverstripe stands and falls with this question!

I hope there is a solution!

greetings from germany - wolfgang

Avatar
Sam

Administrator, 685 Posts

7 July 2008 at 1:29pm

Have a look at the content of HtmlEditorField_Toolbar in HtmlEditorField.php, to see how the existing style dropdown is implemented.

I don't know of any existing patch for this, sorry. We prefer to leave font/colour selection out of the CMS and put that information in the template.