css files & ContentAreaCssFile

2 posts, 1 answers
  1. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 13 Apr 2009 Link to this post

    Hi guys,

    I have two questions regarding the editor.

    1. The "Apply Css class" dropdown has endless css classes from various css files used in the project it seems. They aren't useful for the regular user who is using the editor, so I want to get rid of them.

    Something like this has no effect: editor.CssFiles.Clear()

    2. I have specified a ContentAreaCssFile for the editor. It has the background property of the body set to white. Which works fine, until you enter preview mode. Then the editor defaults back to the body colour of the page instead, in this case, not the same colour. How would I go about overriding this behaviour?

  2. Answer
    Rumen avatar
    13243 posts

    Posted 16 Apr 2009 Link to this post

    Hi -DJ-,

    Straight to the questions:
    1. You can clear the classes loaded in the Apply Class dropdown by either setting

      RadEditor1.CssClasses.Add("", "")

      or the CssFiles property to point to an empty css file:

    2. Instead of setting the ContentAreaCssFile property set the CssFiles property to point to an external css file as it is described in this help article: Setting Content Area Defaults.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top