Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Removing elements from TinyMCE - (Resolved)

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

Page: 1
Go to End
Author Topic: 1843 Views
  • Crossbound
    Avatar
    Community Member
    14 Posts

    Removing elements from TinyMCE - (Resolved) Link to this post

    I'm trying to find out if it possible to remove elements from TinyMCE. To be exact, I am using <h1> as main heading to the website and <h2> for article headings and don't want them to be reused within articles. Is it possible to remove elements from the drop down in TinyMCE?
    I have been searching the web all over and only came across some option 'invalid_elements', but I have no idea where that would be located within the TinyMCE source or if that would actually be the option to set.

    Thanks for your help.

  • lerni
    Avatar
    Community Member
    80 Posts

    Re: Removing elements from TinyMCE - (Resolved) Link to this post

    would also like to know a upgrade save way to do so. /sapphire/thirdparty/tinymce/themes/advanced/editor_template_src.js

    theme_advanced_blockformats : "p,address,pre,h2,h3,h4,h5,h6",

  • Crossbound
    Avatar
    Community Member
    14 Posts

    Re: Removing elements from TinyMCE - (Resolved) Link to this post

    Thank you lerni, that does the trick!
    And you are right, an upgrade save way to do this would be great!

  • lerni
    Avatar
    Community Member
    80 Posts

    Re: Removing elements from TinyMCE - (Resolved) Link to this post

    ahh ...

    HtmlEditorConfig::get('cms')->setOption('theme_advanced_blockformats', 'p,address,pre,h2,h3,h4,h5,h6');

  • Crossbound
    Avatar
    Community Member
    14 Posts

    Re: Removing elements from TinyMCE - (Resolved) Link to this post

    brilliant!

    I assume that line goes into..

    /mysite/_config.php

    I will try that later tonight!

    1843 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.