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

Problem in reverting fore color back to previous selection

4 Answers 53 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Pramod Goutham
Top achievements
Rank 1
Pramod Goutham asked on 05 Sep 2008, 10:01 AM
Hi,

In my rad editor, the default font color is black and the default background color is white. But while typing the content, once I change font and font background colors, I'm not able to revert back the font color to black and font background color to white. This happens when I change both the font color and background color simultaneously. My client is complaining about this problem.  I'm not able to understand why this is happening. How to fix this?

Thanks,
Pramod Goutham

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 05 Sep 2008, 04:14 PM
Hello Pramod,

Could you please, provide steps how to reproduce the problem?
How do you change the font color and background color simultaneously?

It will be best if you open a support ticket and send a sample working project that demonstrates the problem.


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pramod Goutham
Top achievements
Rank 1
answered on 08 Sep 2008, 04:33 AM
Hi Rumen,

I'm unable to open a support ticket, since I myself have not downloaded the trial version or have obtained the license, but I'm using rad controls as part of a team. So I'm briefing again about the problem.

I'm able to change the font color back to the original color, but I'm unable to change the font background color back to white, once I change it to some other color. This happens only after I change the font color. Else I do not find this problem.

I found this problem in the online demo also.

http://demos.telerik.com/ASPNET/Prometheus/Editor/Examples/Default/DefaultCS.aspx

Try editing the content, change the font color and then change the font background color. Type few lines of text, and try changing font background color back to white.

Regards,
Pramod Goutham
0
Accepted
Rumen
Telerik team
answered on 08 Sep 2008, 07:06 AM
Hi Pramod,

The first item in the color pallets of RadEditor is not white, but "remove color" item. I suggest setting the white color manually, because it is not listed by default in the editor's Fore and Back color-pickers.

If you want to include the White color you could add it manually through the Colors collection of RadEditor or through the <telerik:EditorColor tags, e.g.

      <telerik:RadEditor ID="RadEditor1" runat="server">
          <Colors>
              <telerik:EditorColor Title="White" Value="White" />
              <telerik:EditorColor Title="Black" Value="Black" />
              <telerik:EditorColor Title="White" Value="Red" />
          </Colors>
      </telerik:RadEditor>

Here is how to here to populate the color pallet on the server:

        string[] colors = new string[] { "white", "red", "green", "blue", "#ffcccc", "#ffcc99", "#ffff99", "#ffffcc", "#99ff99", "#99ffff", "#ccffff", "#ccccff", "#ffccff", "#cccccc", "#ff6666", "#ff9966", "#ffff66", "#ffff33", "#66ff99", "#33ffff", "#66ffff", "#9999ff", "#ff99ff", "#c0c0c0", "#ff0000", "#ff9900", "#ffcc66", "#ffff00", "#33ff33", "#66cccc", "#33ccff", "#6666cc", "#cc66cc", "#999999", "#cc0000", "#FF6600", "#FFCC33", "#FFCC00", "#33CC00", "#3366FF", "#00CCCC", "#6633FF", "#CC33CC", "#666666", "#990000", "#cc6600", "#cc9933", "#999900", "#009900", "#339999", "#3333ff", "#6600cc", "#993399", "#333333", "#660000", "#993300", "#996633", "#666600", "#006600", "#336666", "#000099", "#333399", "#663366", "#000000", "#330000", "#663300", "#663333", "#333300", "#003300", "#003333", "#000066", "#330099", "#330033" };
        foreach (string color in colors)
        {
            RadEditor1.Colors.Add(color);
        }


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pramod Goutham
Top achievements
Rank 1
answered on 08 Sep 2008, 09:30 AM
Hi Rumen,

Thanks for the code snippet. Its now working fine. I had misunderstood the first color to be white.
Tags
Editor
Asked by
Pramod Goutham
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Pramod Goutham
Top achievements
Rank 1
Share this question
or