I only want two styles to appear in the Style menu:
I've edited the fck_config.js file by changing this setting:
FCKConfig.EditorAreaCSS = 'http://www.xxxxxxxxxx.com.au/style/hb.css' ;
For some reason the styles in hb.css don't appear and only the default styles appear. What am I doing wrong?
Here are the styles defined in hb.css:
.mainheading {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 30px;
color: #a1d1f1;
text-decoration: none;
font-weight: bold;
}
.secondheading {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
color: #a1d1f1;
text-decoration: none;
font-weight: bold;
}
Tue, 06/16/2009 - 07:43
#1
Re: Custom styles
I think you're looking for FCKConfig.CustomStyles and FCKConfig.StylesXmlPath (or the styles contained within the XML file pointed to by that variable...)
Re: Custom styles
If so, how do I translate the following into xml?
.mainheading {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 30px;
color: #a1d1f1;
text-decoration: none;
font-weight: bold;
}
.secondheading {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
color: #a1d1f1;
text-decoration: none;
font-weight: bold;
}
Re: Custom styles
Re: Custom styles
I assume that I have to somehow "tell" the editor to look for 'mainheading' in the css file but how do I do this?
Re: Custom styles
When I did that and loaded a new editor, I immediately got a 'Main Heading' entry in my Style drop-down. You *do* have to define the class 'mainheading' in a style sheet pointed to by your EditorAreaCSS config entry, or defined by an inline style sheet or CSS link if using the FullPage option. But even if the class isn't defined, you'll still be able to apply the style from the Style combo; if you don't see it, something's not loading properly or isn't defined in the right place.
Re: Custom styles
In fck_config.js I have the following:
Re: Custom styles
Per my previous post - do you see the style in the Style drop-down combo?
If "no", then you have a problem with your FCKConfig.StylesXmlPath. This may be an actual configuration problem, or it may mean that you just need to clear your browser cache and try again.
If "yes", and you're not seeing the style applied to your text when you try to do that, then you have a problem with your FCKConfig.EditorAreaCSS - and you do, since you have a full URL appended to the FCKConfig.BasePath.
Re: Custom styles