Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default font type/size in TinyMCE

How do you change the default font type and font size in TinyMCE?

I'm using the advanced skin and I've changed the body, td, pre style in default/content.css but it still doesn't change.

like image 971
Marwelln Avatar asked Jul 27 '10 11:07

Marwelln


People also ask

How do I change the default font size in TinyMCE?

To change the default font family, size, or color in the TinyMCE editor, we recommend using content_css or content_style (or a combination of both) depending on your use case. TinyMCE is shipped with a default CSS that determines what the font and everything else looks like in the editor itself.

How do you change the font on TinyMCE?

Add a custom font family to the menu TinyMCE comes with 17 font options by default. Depending on the editor configuration, users can select a font from the menubar or the toolbar (via the fontselect dropdown). A user selects a font from the fontselect toolbar menu.

How do you change text color on TinyMCE?

This plugin adds the forecolor/backcolor button controls that enable you to pick colors from a color picker and apply these to text. It adds a toolbar button to enable this functionality.


1 Answers

Well, there are several content.css and only one is used to style your editor depending on your configuration settings.

You should use the content_css configuration option and name an own css file where you can overwrite the editors defaults (the content.css you were recently looking for). In your init function use something like

content_css: "http://localhost/css/my_tiny_styles.css",

and in my_tiny_styles.css or whatever file you choose you use

font-family: myfont1, myfont2, sans-serif;
like image 119
Thariama Avatar answered Oct 15 '22 23:10

Thariama