More in this section
Forums / Designing with Sitefinity / How to set the background color for the RadEditor

How to set the background color for the RadEditor

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    09 Nov 2009
    Link to this post
    Hello,

    I am trying to set the background color for the content area of the RadEditor.  I put a radEditor in my own custom control and it is picking up th background color of the body of the page.  Can I set this myself?  I do have a css file used for the rest of the site and I believe this can be done.

    Thanks,

    Randy
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Nov 2009
    Link to this post
    Hello Randy Bauer,

    Here is a sample code that illustrates how to set background color for RadEditor control

    <telerik:RadEditor runat="server" ID="ed1">
     <CssFiles>
     <telerik:EditorCssFile Value="~/Files/style.css" />
     </CssFiles>
     </telerik:RadEditor>

    body
    {
      background-color: Gray;
     
    }

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. mike john
    mike john avatar
    1 posts
    Registered:
    29 Jan 2010
    29 Jan 2010
    Link to this post
    Hi i have tried adding this to my code

     

    <cssfiles>

     

     

    <telerik:EditorCssFile Value="~/style.css" />

     

     

     

     

     

    </cssfiles>

    when the page loads its fine then on refresh it adds this line

    <Telerik.Web.UI.EditorCssFile Value="~/style.css"></Telerik.Web.UI.EditorCssFile>

    which generates this error 

     

    Error Creating Control - RadEditor1Telerik.Web.UI.EditorCssFileCollection must have items of type 'Telerik.Web.UI.EditorCssFile'. 'Telerik.Web.UI.EditorCssFile' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

     

    Al I want to do is change the backround I have also tried adding

     

    .RadEContent

     

    , .RadEContentBordered

     

     

     

     

     

    {

     

     

     

    padding

     

    :3px;

     

     

     

     

    background-color

     

    :#ffffff;

     

     

     

     

    background-image

     

    :none;

     

     

     

     

    margin

     

    : 0px;

     

     

     

     

    text-align

     

    : left;

     

    }

     

    to the css but that doesn't work either what should I do

    thanks
    M


     

     

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jan 2010
    Link to this post
    Hello mike john,

    Please take a look at this articlea - Setting Content Area Defaults , Content Area Appearance Problems, RadEditor CSS Classes and Their Use

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Tyson Hansen
    Tyson Hansen avatar
    1 posts
    Registered:
    16 Jul 2009
    12 May 2010
    Link to this post
    Quick and easy solution! It worked for me with the Q1 2010 RadEditor control.
Register for webinar
5 posts, 0 answered