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.

Customising the CMS /

Removing elements from TinyMCE - (Resolved)


Reply


5 Posts   1976 Views

Avatar
Crossbound

Community Member, 14 Posts

30 May 2010 at 8:27am

Edited: 31/05/2010 2:07pm

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.

Avatar
lerni

Community Member, 80 Posts

30 May 2010 at 9:54pm

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",

Avatar
Crossbound

Community Member, 14 Posts

30 May 2010 at 11:18pm

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

Avatar
lerni

Community Member, 80 Posts

31 May 2010 at 3:26am

Edited: 31/05/2010 3:30am

ahh ...

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

Avatar
Crossbound

Community Member, 14 Posts

31 May 2010 at 4:49am

brilliant!

I assume that line goes into..

/mysite/_config.php

I will try that later tonight!