[opencms-dev] opencms 6 | fckedit | custom styles

Joachim Zittmayr joachim at imap.cc
Wed Mar 22 11:20:53 CET 2006


hi!
got them to work flawlessly!

well and i just did what the help says:

1.) set the template property of your template to the absolute path of
the css-file (e.g. /system/modules/mymod/resources/css/screen.css)
2.) create a plain text file having ${CSS-FILE}_style.css as name next
to your css-file (e.g. 
/system/modules/mymod/resources/css/screen.css_style.xml) 
3.) insert the following style definitions in xml-format (copied from:
/system/workplace/resources/editors/fckeditor/fckstyles.xml)
<Styles>
	<Style name="Image on Left" element="img">
		<Attribute name="style" value="padding: 5px; margin-right: 5px" />
		<Attribute name="border" value="2" />
		<Attribute name="align" value="left" />
	</Style>
	<Style name="Image on Right" element="img">
		<Attribute name="style" value="padding: 5px; margin-left: 5px" />
		<Attribute name="border" value="2" />
		<Attribute name="align" value="right" />
	</Style>
	<Style name="Custom Bold" element="span">
		<Attribute name="style" value="font-weight: bold;" />
	</Style>
	<Style name="Custom Italic" element="em" />
	<Style name="Title" element="span">
		<Attribute name="class" value="Title" />
	</Style>
	<Style name="Code" element="span">
		<Attribute name="class" value="Code" />
	</Style>
	<Style name="Title H3" element="h3" />
	<Style name="Custom Ruler" element="hr">
		<Attribute name="size" value="1" />
		<Attribute name="color" value="#ff0000" />
	</Style>
</Styles>
4.) enjoy editing your content in your template-styles (e.g.
backgrounds, font-sizes, etc...) with the possibility to select custom
styles acoording to those defined in the xml-file!

hope this helps!
joachim

ps: if your stylesheet defines styles which are dependant from other
styles, the editor may not show the "whole big picture"...
-- 
  Joachim Zittmayr
  joachim at imap.cc

-- 
http://www.fastmail.fm - Access your email from home and the web




More information about the opencms-dev mailing list