(Link to clearer explanation of using css styles with fckeditor) |
Prpl Ppl Etr (talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
I wanted to know how to link a style defined in a .css file to the styles in fckstyles.xml. The explanation on this Wiki page is so terse that it was impossible for me to understand (my knowledge of css is basic) | I wanted to know how to link a style defined in a .css file to the styles in fckstyles.xml. The explanation on this Wiki page is so terse that it was impossible for me to understand (my knowledge of css is basic) | ||
− | + | ----- | |
I found this page which makes it a lot clearer. | I found this page which makes it a lot clearer. | ||
Line 8: | Line 8: | ||
− | (and while I'm here... I have to say that understanding how to add custom styles to fckeditor's dropbox was difficult, but removing or hiding the unwanted styles which are already defined (like red title and yellow marker) was, frankly speaking, a total nightmare... | + | (and while I'm here... I have to say that understanding how to add custom styles to fckeditor's dropbox was difficult, but removing or hiding the unwanted styles which are already defined (like red title and yellow marker) was, frankly speaking, a total nightmare... - my worst mistake seems to be using # to disable the unwanted lines, it didn't work, use <!-- --> instead) |
+ | |||
+ | ----- | ||
+ | |||
+ | What the docs don't make clear is that adding you own styles is a TWO-STEP process. | ||
+ | |||
+ | |||
+ | First you need to tell FCKeditor where to find your .css file. | ||
+ | |||
+ | e.g: FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'my_fck_sample_styles.css' ; | ||
+ | |||
+ | |||
+ | Now, if you want your styles to appear in the drop-down box, you need to point the editor to your XML file. | ||
+ | |||
+ | e.g.: FCKConfig.StylesXmlPath = FCKConfig.BasePath + 'my_custom_css_xml.xml'; | ||
+ | |||
+ | |||
+ | Refresh/Clear Cache as necessary to view your changes. |
Latest revision as of 22:11, 17 June 2009
I wanted to know how to link a style defined in a .css file to the styles in fckstyles.xml. The explanation on this Wiki page is so terse that it was impossible for me to understand (my knowledge of css is basic)
I found this page which makes it a lot clearer.
http://www.retroviz.com/CMS/ShowArticle.aspx?ID=71&AspxAutoDetectCookieSupport=1
(and while I'm here... I have to say that understanding how to add custom styles to fckeditor's dropbox was difficult, but removing or hiding the unwanted styles which are already defined (like red title and yellow marker) was, frankly speaking, a total nightmare... - my worst mistake seems to be using # to disable the unwanted lines, it didn't work, use instead)
What the docs don't make clear is that adding you own styles is a TWO-STEP process.
First you need to tell FCKeditor where to find your .css file.
e.g: FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'my_fck_sample_styles.css' ;
Now, if you want your styles to appear in the drop-down box, you need to point the editor to your XML file.
e.g.: FCKConfig.StylesXmlPath = FCKConfig.BasePath + 'my_custom_css_xml.xml';
Refresh/Clear Cache as necessary to view your changes.