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

RadEditor customized colors with own description

5 Answers 96 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 20 Jan 2011, 12:50 PM
Hi Community, it's me again :)

I have put some own colors in my RadEditor for MOSS 2007.

<colors>
    <color value="#FFFFFF" title="Weiss" />
    <color value="#DDDDDD" title="Grau 1" />
    <color value="#AAAAAA" title="Grau 2" />
    <color value="#666666" title="Grau 3" />
    <color value="#000000" title="Schwarz" />
    <color value="#E7EBF7" title="Blau" />
    <color value="#F3E03B" title="Gelb" />
    <color value="#CC0000" title="Rot" />
    <color value="#FF6600" title="Orange" />
    <color value="#9BC73B" title="Gruen 100" />
    <color value="#AED161" title="Gruen 80" />
    <color value="#C2DD88" title="Gruen 60" />
    <color value="#D6E8AF" title="Gruen 40" />
    <color value="#EAF3D7" title="Gruen 20" />
  </colors>

Is there a possibility to view the title attribute as text instead of the hexcode as it is used by darkorange?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Jan 2011, 03:54 PM
Hello Henrik,

To ensure fast loading, the RadEditor has been optimized in all possible ways and respects. One of the choices made when dealing with colors is to send just the values to reduce the array size by half (logic being that users will pick up a color on the basis of what they see rather than based on its name).

That is why, my suggestion would be to use colors which has a predefined text names as the below ones::

<colors>
    <color Value="LightBlue" />
    <color Value="Blue" />
    <color Value="Red" />
    <color Value="Green" />
    <color Value="Magenta" />
</colors>

You can find more color names in the following sites:

http://htmlhelp.com/cgi-bin/color.cgi
and
http://www.computerhope.com/htmcolor.htm.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Henrik
Top achievements
Rank 1
answered on 21 Jan 2011, 08:43 AM
But I can't define my "Green 20" as the name to be shown? It would be nice if there occurs the "Green 20" instead of #EAF3D7. Is this possible?
0
Rumen
Telerik team
answered on 25 Jan 2011, 04:57 PM
Hello Henrik,

The requested feature is supported only by RadColorPicker (standalone) control. Here is how to define the color title attributes:

<telerik:RadColorPicker runat="server" ID="RadColorPicker2" Columns="5" Width="210"
            Preset="None" style="margin:auto;">
            <items>
                <telerik:ColorPickerItem Title="Yellow" Value="#FFFF00" />
                <telerik:ColorPickerItem Title="Light Green" Value="#00FF00" />
                <telerik:ColorPickerItem Title="Turquoise" Value="#00FFFF" />
                <telerik:ColorPickerItem Title="Pink" Value="#FF00FF" />
                <telerik:ColorPickerItem Title="Blue" Value="#0000FF" />
                 
                <telerik:ColorPickerItem Title="Red" Value="#FF0000" />
                <telerik:ColorPickerItem Title="Dark Blue" Value="#000080" />
                <telerik:ColorPickerItem Title="Teal" Value="#008080" />
                <telerik:ColorPickerItem Title="Green" Value="#008000" />
                <telerik:ColorPickerItem Title="Violet" Value="#800080" />
                 
                <telerik:ColorPickerItem Title="Dark Red" Value="#800000" />
                <telerik:ColorPickerItem Title="Dark Yellow" Value="#808000" />
                <telerik:ColorPickerItem Title="Gray - 50%" Value="#808080" />
                <telerik:ColorPickerItem Title="Gray - 25%" Value="#C0C0C0" />
                <telerik:ColorPickerItem Title="Black" Value="#000000" />
         </items>
        </telerik:RadColorPicker>

You can see how to replace the built-in ColorPicker dropdowns with RadColorPicker in the following forum thread: Add Custom Color.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Henrik
Top achievements
Rank 1
answered on 31 Jan 2011, 08:31 AM
I have only the Editor for MOSS 2007. I guess the solution doesn't work then? I am using the ToolsFile.xml?! Is it possible to use your solution then?
0
Accepted
Rumen
Telerik team
answered on 31 Jan 2011, 09:51 AM
Hi Henrik,

The solution for the regular RadEditor for ASP.NET AJAX is available in this project editorcustomcolor.zip. To use it with RadEditor for MOSS you should register the RadColorPicker control in the aspx page but not in the codebehind as shown in the demo. You can learn how to attach the OnClientLoad event when working with RadEditor for MOSS in the following KB article: How to execute custom code called on RadEditor's events.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Henrik
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Henrik
Top achievements
Rank 1
Share this question
or