Defining styles |
The WYSIWYG editor allows you to apply a chosen style to the text using the Style drop-down list in the editor toolbar:
The styles offered in the list are defined in file <web project>\CMSAdminControls\FCKeditor\fckstyles.xml. The structure of the file looks like this:
Every style has some name and element it is used for. The styles are offered in the drop-down list based on the current position of the cursor. If you select some image, the styles for element img will be offered. If you select some text, the styles for element span or div will be offered.
If you choose to apply e.g. the Red text style to the following HTML code:
the result will be this:
As you can see, the text was encapsulated with a SPAN element with attribute STYLE set to color: red.
You may want to apply CSS class names instead of hard-coded styles. In this case, your style definition will look like this:
and the result will be:
In your CSS stylesheet, you need to define the GreenText class name like this:
|