Make default font size bigger in editor window - use 12px
Comments
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.
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';
});
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.
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.
Comments
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.
Krupski
Yes... it's super easy. In the config:
// set the editor font size
ed.onInit.add(function(ed)
{
ed.getBody().style.fontSize = '12px';
});
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.
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.