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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Custom styles in TinyMCE for SS 2.3.1 not working


Reply


5 Posts   1929 Views

Avatar
rceee

Community Member, 18 Posts

30 April 2009 at 7:14am

So... I've edited HtmlEditorField.php, tinymce.template.js, and all the css files I can find, both in template and other directories...

And I still cannot seem to customize the Styles and Format dropdowns in TinyMCE. I do not remember having this much of a problem in 2.3rc. Editing tinymce.template.js did allow me to remove certain buttons, but the dropdown contents are not listed there. I have searched high and low through .css files for "MsoNormal" etc., with no luck. Where are these styles contained?

Avatar
rceee

Community Member, 18 Posts

1 May 2009 at 7:26am

Well, after hours, I think I've found it.

/jsparty/tiny_mce2/themes/advanced/editor_template_src.js.

I haven't seen this referenced in any other forum posts... nor the documentation. TinyMCE is such a cornerstone of SS's functionality... so why is it's implementation and documentation so incomplete? It shouldn't be this hard to customize the editor.

Avatar
Impressa

Community Member, 6 Posts

20 July 2009 at 8:48pm

Hi Rceee

I've been looking for the solution as well. Thank you for the solution. It worked!
:)

Avatar
potion_maker

Community Member, 36 Posts

12 January 2010 at 10:24am

Could either of you clarify what exactly you are changing in the editor_template_src.js file? I'm having a frustrating time figuring this out as well. I've tried a couple of solutions posted in the forums all to no avail. Thanks in advance.

Avatar
Jellygnite

Community Member, 11 Posts

30 November 2011 at 12:36pm

Have you tried editing mysite/_config.php

Add this line:

HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles','Left=left;Right=right');