Technical support This forum is closed.
Version 1.x > Technical support > KCKEditor Styles View modes: 
User avatar
Guest
redactuk - 10/6/2006 4:24:01 PM
   
KCKEditor Styles
How can I have my customer Main.css styles in root of Kentico folder appear in Styles drop-down in FCKEditor? I have tried to edit the FCKConfig.EditorAreaCSS in the jckconfig.js which I believe is responsible but it does now work? Can anyone help please?


Note: I know this has been asked before, but none of previous responses have been answered in detail enough to explain how thi can be done.

Thank you

User avatar
Member
Member
Bipul Dobhal - 10/9/2006 7:01:07 AM
   
Re: KCKEditor Styles
Hi,

I didn't understand your problem. As I had solved my problem related to styles of the FCKeditor..
If you want to add new styles in the combo box then its very simple...

Just go through the following steps

1.Create your own class in "Main.css" like

.ParagaraphBody
{
Font-Size: 10px;
Font-Family: verdana
}

2. Open the /cmsdesk/aspnet_client/FCLEditor/fckstyles.xml file either in notepad or VS.net and add new styles as follows:

<style name="Paragaraph Body" element = "span">
<artribute name="class" value="ParagraphBody">
</style>
<style name="PHeading" element = "span">
<artribute name="class" value="PHeading">
</style>


3. Open the /cmsdesk/aspnet_client/FCLEditor/fckconfig.js file in either in notepad or VS.net and replace the existing line
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/Fck_editorarea.css'
with the new line as follows:

FCKConfig.EditorAreaCSS = "/Main.css";

4. Open the web.config file in the code and set the new key in appsetting tag named CMSCSSVirtualPath as a key :

<add key="CMSCSSVirtualPath" value="http://www.KenticoCMS/CSS/Main.css"></add>

Note: This value is the path of ur .css file

Then compile the code the look out your style in fckeditor......

Thanks,
Bipul Dobhal



User avatar
Guest
redactuk - 10/9/2006 6:21:50 PM
   
Re: KCKEditor Styles
Thanks for that.

Yes this works. My hope was that you could somehow 'automatically' pick up styles in use in your Main.css rather than having to re-code them in the xml file. Ah well.. maybe in version 2 ;)