I am just starting out using FCKeditor. I am developing a test site before purchasing and putting the editor into production. I am using a custom fckconfig.js file and have custom options on the dropdown style list. There is also a custom style sheet. I cannot get the formatting to appear within the fdkeditor. The tags are being applied and saved properly, but they do not display in the editor. I have tried pointing to the custom css file by changing the EditorAreaCSS attribute. I have also tried copying the custom code into the default css file. Nothing works. Our application is vb.net and we are using Internet Explorer. Please let me know what the problem may be.
Thanks
Thanks
Re: Custom Style Sheet
in fckconfig.js, change
//FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
to
FCKConfig.EditorAreaCSS = '/yourpath/yourCSSfilename.css' ;
and your editor area will use that CSS.
and (though there is another way to define styles for the dropdown list), in the same fckconfig.js file, you can add additional styles in the format used by 'Red Title'
FCKConfig.CustomStyles =
{
'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } }
};
I'll bet you already did this stuff, and just forgot to clear your cache.
Hope this helps,
Dennis
p.s. Unless you're on an Intranet, you cannot be sure your users are using Internet Explorer; your users are using whatever browser they want.
Re: Custom Style Sheet
Re: Custom Style Sheet
Thanks
Re: Custom Style Sheet
FCKConfig.EditorAreaCSS = '/yourpath/yourCSSfilename.css' ;
If my site is set up with a CSS folder, called "CSS", right off the root, then the path will be
/CSS/MyCSSfilename.css
if your CSS file is in your site's root, it would be:
/MyCSSfilename.css
I tried that too, at first, but then abandoned the idea because I would have to upkeep the css in yet another file. If I would have changed my CSS file, and forgot to also make the changes within that fck_editorarea.css, then the new CSS changes would not show up.
Remember also that with CSS rules, if you have the same rule defined in more than one area (such as two different CSS files, or inline CSS and a CSS file), then the last rule read is the one that is rendered. So, if you are going to keep your CSS in the fck_editorarea.css file, then you need to make sure your CSS is below any default FCKeditor CSS rules.
Plus, if you decide to keep your CSS in the fck_editorarea.css file, then the JavaScript file needs to reflect that:
in that case, in fckconfig.js, change it back to the default:
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
If this is not a cache problem, my next best bet is that it is a path problem. You should be able to make some simple but obvious CSS change, such as body background-color:red, to quickly determine if the editor is finding the correct CSS.
Dennis
Re: Custom Style Sheet
I too have the same problem. No matter what I try I can't get any new elements in the Format Dropdown. Infact if I remove
FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div;' ;
from the config.js it still loads with the default formats. Clearing Cache doesn't work.
I know that fckstyles.xml is doing something as if I delete the contents the editor doesn't load. If I view source I can also see the path is correct.
I've resulted to adding a class to a div using the plain text editor. Not ideal by any means but it's the only way I see how.
If anyone comes up with another solution I would be very interested to know
Thanks
Mark
Re: Custom Style Sheet
My changes to fckstyles.xml are now updating!
I've also added non-caching code to the top of my asp page, in case it helps anyone:
Keep in mind, when you use non-caching code, if your page is already cached, you have to clear it the first time. After that, your page should never cache again.