TinyMCE font sizes in Plone 4


Is there a simple way to add font sizes option to TinyMCE editor in Plone 4?

In terms of different sizes I have only the options set here (I think): https://github.com/plone/Products.TinyMCE/blob/master/Products/TinyMCE/profiles/default/tinymce.xml#L38

I'm not sure it's a good idea (in terms of design consistency), but it is a request from a client.
Do you have a solution for this?



In /portal_tinymce/@@tinymce-controlpanel - Styles add definitions:

Font size 8|span|custom-font-size-8
Font size 9|span|custom-font-size-9
Font size 10|span|custom-font-size-10

Meaning you can select the options Font size x in your editor. This will be saved as a span with class custom-font-size-x.

When you save this it will already work. But you need the styles to make this visible.
I had an override to tinymce editor already set so I added the styles for each class like:

.custom-font-size-10 {
  font-size: 10px !important;

in content.css.dtml file. Also add this css in your theme to see the effect in view mode.

1 Like