Groups > Application developers > Community Server discussion > Re: Changing the default display font in FreeTextBox editor




Changing the default display font in FreeTextBox editor

Changing the default display font in FreeTextBox editor
Mon, 4 Dec 2006 14:40:10 +0000
This is how to change the default display font for FreeTextBox.  This works for
CS 2.0 in both FF and IE, but I can't verify for CS 2.1, since FTB would be
implemented with a custom wrapper which may or may not support the same config
change and I have not tested it. 

For CS 2.0 and FreeTextBox 3.0, in the /FreeTextBox3 directory you'll see a
FTB-FreeTextBox.js file.  On line 18 make the following change.  From

this.designModeCss =
designModeCss.replace(''',"'").replace('&#39',"'&quo
t;);

to 

this.designModeCss = '/FreeTextBox3/mystyle.css'; 

then add a mystyle.css to your FTB directory.  The body tag will be used for the
FTB editor default display font.  Something like

body 
{
 font-family: Verdana;
}
Post Reply
Re: Changing the default display font in FreeTextBox editor
Mon, 4 Dec 2006 17:35:11 +0000
Well,

For the custom version of the FreetextBox wrapper, there is no need for such
change in the freetextbox.js 

Inside the FreeTextBox3 folder there is ftb.css. In ftb.css you can change the
body style in order to change the default style in FreeTextBox editor. I know, 
I should had documented this feature in the installation file that comes with
FreetextBox wrapper...

 

George J.
Post Reply
Re: Changing the default display font in FreeTextBox editor
Tue, 12 Dec 2006 14:34:23 +000
Hello!

 I think i've found how to implement default font (size, color, etc) without any
intruding to internal code of FTB.

i've just set .Text property like this - 

...Page_Load (... ){
..
if (!IsPostBack) {
// also if not defined text to edit
 ftbText.Text = "<font style='font-family'></font>";
} 
...
}

It really works!
Post Reply
Re: Changing the default display font in FreeTextBox editor
Tue, 12 Dec 2006 21:32:29 +000
Gee, and I thought I was providing a hot FTB tip there!  Oh, well.

Thanks, George!

-Dave

p.s. profuel, your tip made the Daily News.  Are you sure it works?
Post Reply
Re: Changing the default display font in FreeTextBox editor
Wed, 13 Dec 2006 16:40:57 +000
I think that all the tips are great because they will all help people with
different levels of understanding and also foster more understanding of how CS
works.
Post Reply
about | contact