Design and CSS styles
Version 4.x > Design and CSS styles > FCKEditor Style DropDown View modes: 
User avatar
Member
Member
jonkuehn - 3/11/2009 8:35:15 AM
   
FCKEditor Style DropDown
I have added a class reference as indicated in the devguide to fckstyles.xml. I have also added the classes to the Editor CSS Stylesheet. The webpart text is getting styled properly, however the class name is not styled in the FCKEditor "Style" dropdown. Typical FCKEditor behavior has styled text in the dropdown. Is there a way for the Style dropdown to have styled class names?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/11/2009 2:20:33 PM
   
RE:FCKEditor Style DropDown
Hi,

This is rather a question to FCKEditor documentation or forums...
However, as it seems, linked style from CSS (using "attribute" tag with class) is not projected to the style dropdown list item here.

Do you have some example of FCKeditor instance, which loads styles from CSS and these are projected to the style dropdown as well?

Thanks in advance for information.

Regards,
Zdenek C.

User avatar
Member
Member
jpk - 3/12/2009 3:35:05 PM
   
RE:FCKEditor Style DropDown
Here's a screen shot of what I'm referring to. In this example, I am using an xml file that specifies the style class names. The classes are in a separate .css file. Both files are referenced in /fckeditor/fckconfig.js.

User image

Thanks,
Jon

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/19/2009 12:06:07 PM
   
RE:FCKEditor Style DropDown
Hi,

yes, I know what you're reffering to.

Are you using styles for <div> elements?
For instance the devguide article example:

<Style name="Green text" element="div">
<Attribute name="class" value="GreenText" />
</Style>

The problem is that the dropdown list items get styled only if the style is for <span> tags.

This is a behavior of FCKeditor, so you will need to modify the editor source code to change this.

Please correct me if I'm missing something - the styles from your screenshot are for "span" elements, right?

Regards,
Zdenek C.

User avatar
Member
Member
jpk - 3/20/2009 8:18:12 AM
   
RE:FCKEditor Style DropDown
Correct. The styles from the screenshot are using span elements. That was done in a separate project. I used the same xml file for my Kentico project and copied the styles into my "Editor CSS Stylesheet".