How To... Overwrite the Default Text Editor Style

Changing the default style applied within the text editor.

The component text editor by default displays styles associated with the 'body' selector in your css. This can cause a conflict when your css incorporates a full range of elements, divs and classes. Applying the cssstyle attribute to your TEXT tag to rectify the problem.

1. Apply a new attribute to a %TEXT% tag

The text editor displays styles as specified in the body tag of your style sheet. To over rule this action, you need to point the text editor to a new style.

So, within any snippet that uses a %TEXT% tag, define a class for the cssstyle attribute:

  1. %TEXT(cssstyle=.mystyle)%

2. Add a style in your Stylesheet

And in your css (bearing in mind to keep this rule at the end of the document so that no cascading overrules it), add:

  1. body.myStyle {
  2. Xxxxxxxx;
  3. }

See Also:

Video Guides

How To...

Tag Definitions