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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Change font size & colour, lets make it simple


Go to End


5 Posts   2865 Views

Avatar
shaf

Community Member, 27 Posts

19 June 2013 at 10:33pm

Edited: 19/06/2013 10:39pm

i added this to installation as we all need this straight away! here's a post i read have not got a clue how u do it as i am not a programmer lol i had the same prob in getsimple cms solved though like am sure this will be in a basic understanding.. as soon as the right person reply's : )
Re: [SOLVED] TinyMCE - Adding font, size and colour
28 January 2009 at 9:06am

"font, size or colour of text buttons"

I got it working in the latest version of SilverStripe, by editing the tinymce.template.js file, adding forecolor, fontselect and fontsizeselect to the configuration.

......................................................
OK so were do i add forecolor, fontselect and fontsizeselect to the configuration. in the tinymce.template.js file on my server? as in do i add to the top of the code or the bottom or replace some code or ? or ?
exactly were ? do i delete anything ? please explain in a very basic way thankyou Screen shots would help too : )

Avatar
Devlin

Community Member, 344 Posts

19 June 2013 at 10:52pm

Edited: 19/06/2013 10:58pm

This is the install sub forum. Please ask those kind of question in "Customising the CMS".

Note: "forecolor, fontselect and fontsizeselect" is bad practice. Please use CSS classes and common html tags instead.

However, you can set this option in your _config.php with:
HtmlEditorConfig::get('cms')->addButtonsToLine(4, 'fontsizeselect,forecolor,fontselect');

Avatar
shaf

Community Member, 27 Posts

20 June 2013 at 2:03am

i see , thanks for ur reply , so i copy and paste this ('cms')->addButtonsToLine(4, 'fontsizeselect,forecolor,fontselect'); to the bit i point to in the pic the highlighted bit? could you be more basic please, i havnt got a clue about html tags to add colours etc sorry so please be basic : )

Avatar
Devlin

Community Member, 344 Posts

20 June 2013 at 2:46am

You can find your "_config.php" in the "mysite" directory.

Simply add this line in mysite/_config.php:

HtmlEditorConfig::get('cms')->addButtonsToLine(4, 'fontsizeselect,forecolor,fontselect');

Then reload the cms.

Avatar
shaf

Community Member, 27 Posts

20 June 2013 at 2:12pm

ok thanks :) much appreciated