Is there a way to set a custom font size with TinyMCE?

Vote:
 

I see there are paragraph options, but I don't see an option to set a custom font size. Any ideas?

#278322
Apr 11, 2022 12:51
Vote:
 

I found that I could add fontsizeselect to the Toolbar string, but I'm having trouble defining the sizes somewhere. In the JS settings, there's an "initi" section that allows this. But I'm not sure of the C# equivalent.

#278323
Apr 11, 2022 13:07
Vote:
 

Hi,

If you want to allow editors to choose from a specific list of font sizes then, as you've spotted, you can add "fontsizeselect" to the toolbar to display the font size dropdown. To control the options in that dropdown, you can call the AddSetting method of your TinyMceSettings like this:

config.Default()
    .Toolbar("bold italic underline fontsizeselect")
    .AddSetting("fontsize_formats", "1pt 2pt 3pt 9pt 100pt");

To maintain consistency between pages though, I tend to go for allowing specific styles from the style dropdown instead of allowing the editors to change font sizes directly.

#278324
Apr 11, 2022 13:30
eperezjr - Apr 11, 2022 13:51
Perfect! Thanks so much for your help.
Vote:
 

I think what you are looking for is here in this documentation https://docs.developers.optimizely.com/content-cloud/v12.0.0-content-cloud/docs/custom-style-formats 

#278325
Apr 11, 2022 13:30
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.