Feature #4033

Make default font size bigger in editor window - use 12px

Submitted:
2011-01-29 12:43:14 By: eigentor
Closed Priority: 3 Resolution: Wont Fix Assigned to: None
What has been bugging me forever with TinyMCE is that is sets the default font size in the editor window to a tiny size of 10px. (see attached image) It has bugging me so much I never used the editor.

As you normally want people to have some kind of preview of what the text is going to look later (even if you do not use the styles of your template), this is never going to fit. I guess hardly anyone sets the site font size so small. Let alone it is hard to read.

So I always change it to 12px. But I have to change it inside Tinymce's source files, since the editor window sits inside an iframe and one cannot override styles inside the iframe from my sites theme. I have to hack it. When I upgrade Tinymce - gone.

I found this in the first lines of the content.css of all skins:
body, td, pre {
font-size: 10px;
}

Please change it to 12px.

 

If you wish to follow or post a comment, you need to be registered and logged in.

Comments

User Image
  • 2011-01-30 21:42:56

spocke

Nope. You change it your self instead you can load CSS dynamically using content_css and everyone doesn't want font size 12 so changing it wouldn't resolve anything. This is not a bug but a config issue.

User Image
  • 2011-02-01 18:09:19

Krupski

Yes... it's super easy. In the config:

// set the editor font size
ed.onInit.add(function(ed)
{
ed.getBody().style.fontSize = '12px';
});

User Image
  • 2011-02-01 22:14:32

spocke

Good that it works for you or use a custom content_css file with:
body {font-size:12px} that is the recommended way since it's more flexible since you can have p {color: red} or what ever.

User Image
  • 2011-02-02 08:34:10

Krupski

QUOTE: ".....or use a custom content_css file ....."

My message board has a PHP generated select drop-down font size selector. The user's selection is stored in a cookie and returned as a variable. So, to dynamically set the editor font size to match the board, I need to use:

ed.getBody().style.fontSize = {TEXT_SIZE} + 'px';

This way, all users get the board (and editor) font size that THEY want, rather than a hard coded value in CSS.

Otherwise, yes the CSS file is the way to go. My application needs to dynamically switch sizes.... that's why I do it this way.