00 Votes

TinyMCE How to change default font-size for "Clear Formatting" Button

Question by Guest | 2022-02-11 at 15:25

After I hit "Clear Formatting" the font size changes to 8 and font family to Arial, is there anyway to change this default settings?

11 Vote

You can use content_css or content_style to define your default settings.

If you have a css file with your defaults, you can define it in the following way:

  selector: "textarea",
  content_css: "/mydefault.css"

Just define the path to that css file with content_css. Even multiple css files can be defined comma separated.

Apart from defining a file, you can also define the style directly:

  selector: "textarea",
  content_style: 'font-size: 10px; font-family: mono'

This defines a custom font size and family.
2022-02-11 at 16:49

ReplyPositive Negative

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.