I'm using the EditorAreaCSS attribute to define custom styles for the editor (v 2.6.4). I've used that attribute to point the editor to the correct CSS file. I know that the editor is seeing the CSS file, because (for once!) everything works fine in IE 7.
However, in Firefox 3, I can see the class names in the Style drop-down, but they are not formatted, and when I apply them to text in the editor window, nothing happens. The strange thing is that the styles listed in the Format drop-down (Normal, H1, H2, H3, H4) display correctly in the drop-down and work fine when applied to text. It's only in the Style drop-down that they are not formatting or applying properly.
One more thing: in order to get the styles to list in the Style drop-down, I had to add them to an XML file pointed to by the StylesXmlPath attribute. Is this the correct way to do it? It seems like if I am pointing the editor to the stylesheet, it should read the styles from that automatically and not need the XML file. But the only way I can get the styles into the Style drop-down is by using the XML file.
I hope this isn't too confusing...thanks in advance for any help.
However, in Firefox 3, I can see the class names in the Style drop-down, but they are not formatted, and when I apply them to text in the editor window, nothing happens. The strange thing is that the styles listed in the Format drop-down (Normal, H1, H2, H3, H4) display correctly in the drop-down and work fine when applied to text. It's only in the Style drop-down that they are not formatting or applying properly.
One more thing: in order to get the styles to list in the Style drop-down, I had to add them to an XML file pointed to by the StylesXmlPath attribute. Is this the correct way to do it? It seems like if I am pointing the editor to the stylesheet, it should read the styles from that automatically and not need the XML file. But the only way I can get the styles into the Style drop-down is by using the XML file.
I hope this isn't too confusing...thanks in advance for any help.
Re: Custom StyleSheet Problem
In Firefox, the editor is not correctly pulling in the style information from the stylesheet (although it DOES work correctly for the formats such as h1, h2, h3, etc.). I see the styles that I have defined in the XML file, but they are not formatted. The only way I can get them to work in Firefox is to actually add a "style" attribute to each style and paste in the CSS for each style, which then gets duplicated in the HTML each time it's applied to a node.
In IE7, everything works as it is supposed to -- the editor pulls the formatting directly from the stylesheet and applies it correctly to elements on the page.
Is this just a bug with the new version (2.6.4)? Has anyone else encountered a similar problem? I have spent hours on this, poured over the documentation, and searched this forum, but have not found an answer.
Thanks for your time.
Re: Custom StyleSheet Problem -- Problem Solved
It turned out that using numbers in the style names caused the bug to appear in Firefox.
For example, originally I had a style defined as
.18BoldBlue {font-size: 18px; color: blue; font-weight: bold}
And then defined in the XML Styles file as follows:
<Style name="18 Bold Blue" element="div">
<Attribute name="class" value="18BoldBlue" />
</Style>
For unknown reason, the use of a number in the class name caused Firefox 3 not to display the style correctly in the editor. When I renamed the style to "XL-Blue" or "BigBlue" or anything without a number, the problem was solved.
Hope this helps anyone who might encounter a similar problem in the future, and it would be great if this bug could be addressed in a future release.
Re: Custom StyleSheet Problem: Using Numbers in Style Names
Try your stylesheet here: http://jigsaw.w3.org/css-validator/#val ... th_options
Re: Custom StyleSheet Problem: Using Numbers in Style Names