Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Custom styles in TinyMCE for SS 2.3.1 not working

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

Page: 1
Go to End
Author Topic: 1867 Views
  • rceee
    Avatar
    Community Member
    18 Posts

    Custom styles in TinyMCE for SS 2.3.1 not working Link to this post

    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?

  • rceee
    Avatar
    Community Member
    18 Posts

    Re: Custom styles in TinyMCE for SS 2.3.1 not working Link to this post

    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.

  • Impressa
    Avatar
    Community Member
    6 Posts

    Re: Custom styles in TinyMCE for SS 2.3.1 not working Link to this post

    Hi Rceee

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

  • potion_maker
    Avatar
    Community Member
    36 Posts

    Re: Custom styles in TinyMCE for SS 2.3.1 not working Link to this post

    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.

  • Jellygnite
    Avatar
    Community Member
    11 Posts

    Re: Custom styles in TinyMCE for SS 2.3.1 not working Link to this post

    Have you tried editing mysite/_config.php

    Add this line:

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

    1867 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.