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

Color Picker Change/Add Default Color

5 Answers 123 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
MarcoFischboeck
Top achievements
Rank 1
MarcoFischboeck asked on 24 Sep 2007, 11:52 AM
Hello,

i need some help. 
I am using the RadEditor for SharePoint in a WCM Cenario, the Version is 4.3.1.0.

I need to add some special Company-Specific-colors into the color picker (The small window you can change the background or font color). 

Can anybody help me?

Thx Marco


5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Sep 2007, 01:00 PM
Hello Marco,

You can control the contents of the Color dropdowns by modifying the editor's ToolsFile.xml, which is located in the following folder:

/Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.3.1.0__1f131a624888eeed/RadControls/Editor/

Add a <colors> node inside the <root> node, but outside the <tools> node. List all colors you want to use.

<colors>
  
<color value="#FF00EE" />
  
<color value="#840012" />
  
<color value="#0000AA" />
  
<color value="#95AA34" />
</
colors>

This will populate the ForeColor and BackColor dropdowns with your new color items.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MarcoFischboeck
Top achievements
Rank 1
answered on 27 Sep 2007, 02:35 PM
Thank you! It helped me.
0
Marja
Top achievements
Rank 1
answered on 12 Jan 2009, 12:12 PM
Dear All,

I have a customer who's company colors have specific names.
I've managed to get the colors to show correctly, but the names are showing the hex value of the color instead of the title.

My code is:
</tools>
<colors>
    <color Title="Cool" Value="#0190a1" />
</colors>
Kind Regards,
Marja
0
Rumen
Telerik team
answered on 12 Jan 2009, 12:46 PM
Hi Marja,

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).

So, my suggestion would be to simply use the following syntax:

<colors>
    <color Value="LightBlue" />
</colors>

If this is not a good enough solution for your scenario, you can use the attached sample page, which demonstrates how to override some methods of the color picker tool of the editor to allow for changing the string that appears in the color tooltips.

Greetings,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Marja
Top achievements
Rank 1
answered on 16 Jan 2009, 04:12 PM
Thanks, that solved my problem!

regards,
Marja
Tags
WebParts for SharePoint
Asked by
MarcoFischboeck
Top achievements
Rank 1
Answers by
Rumen
Telerik team
MarcoFischboeck
Top achievements
Rank 1
Marja
Top achievements
Rank 1
Share this question
or