phone

How to change tinymce default font or text size

Everyone has a favorite text editor, but my favorite is Tinymce; it is simple and I love simplicity. However, like everything else, nothing is never 100 percent. The only drawback with Tinymce is the default text / font size of its html editor. The font is very small, like a 10 px, and can be taxing on the eye.

There is an easy fix to that.

Create a css file. It can be in the same folder with Tinymce or in you domain root, it does not matter. Add the following to it

body {font-size: 13px; font-family:Arial,Helvetica,sans-serif;}

p {font-size: 13px;}

and save it as content.css or your preferred file name

Then add this in the head where the Tinymce javascript is found

<script type=”text/javascript”>

tinyMCE.init({

// Example content CSS (should be your site CSS)
content_css : “content.css”,

});
</script>

That is it. You can change the font size in the css file from 13px to any size of your preference. You can also use em instead of px

Grow Your Business. Call: 256-361-9080

Leave a Reply