[opencms-dev] FCKEditor not displaying styles in dropdown

Jon Sharp jon.sharp at j2ssolutions.com
Mon Dec 29 19:04:02 CET 2008


In OpenCms 7
I've setup a template stylesheet (aspawd_fam.css) under 
/system/resources/, and refer to this in the template property of my 
template. The styles get picked up by FCKeditor OK (eg BODY is 
rendered my way).
I'm now trying to get the custom styles to be listed in dropdown, so 
followed http://www.opencms-wiki.org/FCKEditor, creating 
aspawd_fam.css_style.xml, with test content:
<?xml version="1.0" encoding="utf-8" ?>
    <Styles>
         <Style name="Custom Ruler" element="hr">
                 <Attribute name="size" value="1" />
                 <Attribute name="color" value="#ff0000" />
         </Style>
    </Styles>

However when now editing a regular page, in IE7 I now get:
Emacs!

Text is: 'Error loading 
"/aspawdcms/opencms/system/resources/aspawd_fam.css_style.xml" Do you 
want to see more info'  On clicking OK, I get:
Emacs!

Text is: Status: 200...
    <?xml version="1.0" encoding="utf-8" ?>
    <Styles>
         <Style name="Custom Ruler" element="hr">
                 <Attribute name="size" value="1" />
                 <Attribute name="color" value="#ff0000" />
         </Style>
    </Styles>
(which seems correct) and on clicking OK, I get partly loaded editor 
buttons etc with no user content.

And in Firefox 3.0.5:
I get same editor display, but with an error flagged, which FireBug 
says is  line 52 of  fckeditorcode_gecko.js
'D is null'

I noticed that the place the CSS is stored in the example is 
/system/modules/your.module.name/resources/css/yourcss.css  where as 
mine is in equivalent of /system/resources/yourcss.css.  Should this matter?

BTW If I'm not using header 1 (H1) can this be suppressed in style list?



----------
Jon Sharp    tel: +44 1273 504004    mobile: +44 7739 430793
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20081229/1fb790d2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 26f53c7.jpg
Type: image/jpeg
Size: 37797 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20081229/1fb790d2/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 26f5415.jpg
Type: image/jpeg
Size: 65453 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20081229/1fb790d2/attachment-0001.jpg>


More information about the opencms-dev mailing list