| how to control default font size in rich text editing [message #32790] |
Fri, 03 August 2007 00:38  |
indigodandelion Messages: 8 Registered: April 2007 |
Junior Member |
|
|
Hi everyone,
I have now my rich text editor setup. But the problem is the font (size 1 by default) is too small for my application. I would like to change it to size 2 as default. I browsed the TinyMCE API, but could not find anything about how to change the font size. If someone knows how to do it, could you please help me on that?
Thank you!
Jingyi
[Updated on: Fri, 03 August 2007 01:12]
|
|
|
|
|
|
| Re: how to control default font size in rich text editing [message #34478 is a reply to message #32790 ] |
Wed, 29 August 2007 19:28   |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
Are you talking about the font size within the editor's window?
If yes, then you can set custom css via content_css parameter. Just pass it along other tinymce_options, ie:
content_css: "/css/my_custom_css.css"
In your css file specify the desired font size for body element, ie:
body{font-size:1em}
[Edit: Fixed spelling]
[Updated on: Wed, 29 August 2007 19:29]
|
|
|
| Re: how to control default font size in rich text editing [message #34479 is a reply to message #34478 ] |
Wed, 29 August 2007 20:03   |
sfxpt Messages: 339 Registered: January 2007 Location: Canada |
Faithful Member |
|
|
Yes, I'm talking about the font size within the rich editor's window.
How to pass 2 options to tinymce_options?
I tried the following but I then don't get rich edit at all:
notes: { params: rich=true tinymce_options=height:200 content_css: "/css/my_tinymce_css.css" }
thx
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
|
|
|
| Re: how to control default font size in rich text editing [message #34481 is a reply to message #34479 ] |
Wed, 29 August 2007 20:16   |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
You need comma after each tinymce_option, so:
notes: { params: rich=true tinymce_options=height:200, content_css: "/css/my_tinymce_css.css" }
|
|
|
|
| Re: how to control default font size in rich text editing [message #34483 is a reply to message #34482 ] |
Wed, 29 August 2007 21:01   |
sfxpt Messages: 339 Registered: January 2007 Location: Canada |
Faithful Member |
|
|
Hmm, I think the way we pass 2 options to tinymce_options is wrong. I tried the following, ie only 1 option:
notes: { params: rich=true tinymce_options=content_css:"/myproj/css/my_tinymce.css" }
and finally see the font size get changed.
But again, no matter what # I put there in my .css file, the rich text editing font size is the same, which is way too large.
comments?
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
|
|
|
| Re: how to control default font size in rich text editing [message #34484 is a reply to message #34483 ] |
Wed, 29 August 2007 21:10   |
pezetgee Messages: 734 Registered: March 2006 |
Faithful Member |
|
|
Strange, it works for me:
<?php echo object_textarea_tag($person, 'getBio', 'rich=true tinymce_options=width:500, height:500, content_css: "/css/tinymce_person.css"') ?>
Fragment of tinymce_person.css:
body {font-size:1em; line-height: 1.5em; font-family: Verdana, Arial, sans-serif; text-align: left}
|
|
|
| Re: how to control default font size in rich text editing [message #34485 is a reply to message #34484 ] |
Wed, 29 August 2007 21:47   |
sfxpt Messages: 339 Registered: January 2007 Location: Canada |
Faithful Member |
|
|
guess the syntax use in generator.yml is a bit different.
I finally get it working:
notes: { params: rich=true tinymce_options=height:300,width:500,content_css:"/myproj/css/my_tinymce.css" }
In my_tinymce.css:
thanks for your help!!!
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
|
|
|
| Re: how to control default font size in rich text editing [message #34933 is a reply to message #34478 ] |
Wed, 05 September 2007 03:53  |
indigodandelion Messages: 8 Registered: April 2007 |
Junior Member |
|
|
pezetgee,
thanks a lot for your help. Yes, I was unable to solve this problem quickly before, so jumped to other problems. Now this problem is solved so easily. Thank you!
Jingyi
|
|
|