ContentArea background color

6 posts, 0 answers
  1. Mark
    Mark avatar
    20 posts
    Member since:
    Oct 2011

    Posted 24 Nov 2011 Link to this post

    Ive read multiple threads on here about setting the background color of the editor but with no success.

    As my page background is dark, text is unreadable so i want to make the background white.

    Ive created a EditorContentArea.css file but not sure where i place this. Its currently in the web root but isnt being picked up.

    do i need to set the path to this somewhere in an editor property or does the editor expect to load it from a certain location?

    has anyone succeeded in doing this?

    my only alternative is to try another editor if i can't find a solution to this


  2. Rumen
    Admin
    Rumen avatar
    14462 posts

    Posted 24 Nov 2011 Link to this post

    Hello Mark,

    All you need to do is to set the CssFiles property as shown in the following article: Content Area Appearance Problems, e.g.

    <telerik:RadEditor ID="RadEditor1" runat="server">
        <CssFiles>
            <telerik:EditorCssFile Value="~/EditorContentArea.css" />
        </CssFiles>
    </telerik:RadEditor>


    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Mark
    Mark avatar
    20 posts
    Member since:
    Oct 2011

    Posted 24 Nov 2011 Link to this post

    thanks

    i was doing that however i didnt realise till i read a thread here that my body background-color needs the !important attribute as:

    background-color: #ffffff !important;

    so something must have been overriding this style when my page loaded...

    i have just noticed that while the default editor is now adopting the white background, when i switch to preview mode this is lost and it acquires the dark background color of the page again.

    how would i address this issue?

    thanks

     

     

     

     


  4. Rumen
    Admin
    Rumen avatar
    14462 posts

    Posted 25 Nov 2011 Link to this post

    Hi Mark,

    I made a test by setting the CssFiles property and I was unable to reproduce the problem in Preview mode.
    You can see my test in the following video: http://screencast.com/t/6r9dpTRa5m.
    Am I missing something? Are you able to reproduce the problem with the attached project?

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  5. Mark
    Mark avatar
    20 posts
    Member since:
    Oct 2011

    Posted 25 Nov 2011 Link to this post

    Apologies..

    Today its working fine... :) This was immediately after i had changed the css so whether it had cached for that option ive no idea...

    anyway, 1 final query...

    the editor is showing my database content ok, but when i make any amendment and update, the change/s are not reflected in the database.

    it simplys saves the original content.

    running in debug shows the uxRadEditor.Content passed to my update function is NOT including my changes (just shows as the original content) but no reason why this is happening.

    ive ensured the contentareadiv is set to 'div'.

    what reasons would this be happening..?
  6. Rumen
    Admin
    Rumen avatar
    14462 posts

    Posted 25 Nov 2011 Link to this post

    Hello Mark,

    The case could be that the editor's original value overwrites the one submitted from the browser. This happens, for example, if you did not put the initial value setting in a if block checking whether the page is postback. Here is what you should do in your Page_Load method:

    If (!Page.IsPostBack)
    {
       //Set the editor content from database here
    }

    You can replace RadEditor with an Asp:TextBox and try to reproduce the problem. You should also replace the Content property of RadEditor with the Text property of the textbox control.

    Another reason for the issue is described in this KB article: http://www.telerik.com/support/kb/aspnet-ajax/editor/radeditor-content-not-saved-after-ajax-update-in-firefox-google-chrome-and-safari.aspx


    All the best,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top