Hi everyone
I'm using CKEditor 3.x and would like to know how I can change the defaut font and fontsize for the editor. I'd like to have it in Arial 12pt. Basically, I don't want the user to have any options, I would like to set a default via the config file.
Any ideas?
Thanks!
Jared
I'm using CKEditor 3.x and would like to know how I can change the defaut font and fontsize for the editor. I'd like to have it in Arial 12pt. Basically, I don't want the user to have any options, I would like to set a default via the config file.
Any ideas?
Thanks!
Jared
Re: How do you set default font and default font size?
the answer is inside the following API documentation
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.font_style
Re: How do you set default font and default font size?
config.font_style =
{
element : 'span',
styles : { 'font-family' : '#(family)' },
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
};
Thanks!
Re: How do you set default font and default font size?
Re: How do you set default font and default font size?
Any other ideas?
Re: How do you set default font and default font size?
You're right, I tried it myself and it didn't work for me. Not sure why, maybe someone else knows...I even found the following post with the same issue:
URL
viewtopic.php?f=11&t=16251
Re: How do you set default font and default font size?
Re: How do you set default font and default font size?
Anyone else have any ideas?
Thanks!
Re: How do you set default font and default font size?
But setting
In the config.js file did nothing. The font and size drop-downs do not have any values selected.
Any ideas, anyone?
Re: How do you set default font and default font size?
Re: How do you set default font and default font size?
Sounds like a bug to me. I would check if this issue hasn't been logged already and if not, log a point.
Re: How do you set default font and default font size?
This sounds like what I need to simply change the font used in the editor to Arial by default. Where is this contents.css file?
Re: How do you set default font and default font size?
Me too having this problem I tried to change every bit of css code trying to change the default font but I couldn't .. I see somebody solve this dilemma and change it by editing (contents.css) but I can't find this file. Where it is?! .. I tried to make it but nothing happen.
Re: How do you set default font and default font size?
Solution:
It took me quite a while to figure this out.
Let us say you want to use Verdana as the default font. Here is what you can do:
1. Open contents.css and change the font tag:
font-family: Verdana;
2. In the application/page where the output will be published, add this style:
<style>
.entry-content {font-family: Tahoma;}
</style>
That's it! Now you have change the default font successfully. This works for the font size as well. I just finished developing this question2answer site, بنات بنات, which utilizes CKEditor and this tiny issue kept me awake for two days!
Re: How do you set default font and default font size?
This is working great in IE but not in Firefox.
Can we set a pre-defined font and font size for Firefox browser?
Please advise.
Thanks, Kris
Yes but if your font family
Yes but if your font family is a variable, how do you do ?
http://stackoverflow.com/questions/16339258/ckeditor-4-how-to-set-default-font