This is a migrated thread and some comments may be shown as answers.

ContentArea background color

5 Answers 65 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 24 Nov 2011, 04:29 PM
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


5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Nov 2011, 05:08 PM
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
0
Mark
Top achievements
Rank 1
answered on 24 Nov 2011, 05:48 PM
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

 

 

 

 


0
Rumen
Telerik team
answered on 25 Nov 2011, 11:54 AM
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
0
Mark
Top achievements
Rank 1
answered on 25 Nov 2011, 01:13 PM
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..?
0
Rumen
Telerik team
answered on 25 Nov 2011, 04:09 PM
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
Tags
Editor
Asked by
Mark
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Mark
Top achievements
Rank 1
Share this question
or