I’m using the TinyMCE Advanced plugin so that I can add my own custom styles to the Style dropdown in the Visual Editor. However, I don’t want some of the styles that are included in the style.css file to be listed there, as they are ‘internal’ classes (for aligning pictures etc).
Is there a way to stop these classes being shown in the dropdown? Either by changing the TinyMCE Advanced configuration, or by editing the CSS file in a certain way?
This should be what you’re looking for – put this code into your theme’s
functions.php
file:This way the only style that will be displayed is
your_style
.The 3rd line is taking care of tinymce formats – might be useful too.
See Plugin_API/Filter_Reference/tiny_mce_before_init for more informations and examples.