Styles"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Link to clearer explanation of using css styles with fckeditor)
 
 
(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... after three hours, I gave up)
+
(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.

This page was last edited on 17 June 2009, at 22:11.