I would like to add a class to my “formatselect” options of the tinyMCE in WordPress. So when selecting a h1 from the dopdown it should generate a <h1 class="blue">
.
I found this Post, but can’t get it to work.
Any ideas?
Thanks in advance!
I would like to add a class to my “formatselect” options of the tinyMCE in WordPress. So when selecting a h1 from the dopdown it should generate a <h1 class="blue">
.
I found this Post, but can’t get it to work.
Any ideas?
Thanks in advance!
You must be logged in to post a comment.
What is described there is working even though not suitable for everyone. I’ll give you a short list of what you need to do:
1. use the content_css tinmce init setting
2. Create a content.css file containing your class
3. use the styleformatting tinmce init setting
4. Make sure you have the style button included (tinymce init)
You should be able to select text from the h1-tag in the editor and select foo from the dropdown menu of styles. The class should be applied to your selected text.