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

Adding Font Colors

1 Answer 37 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jillian
Top achievements
Rank 1
Jillian asked on 12 Mar 2012, 01:46 PM
Is it possible to add custom colors to the font color selection box of the Editor?

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 13 Mar 2012, 01:08 PM
While this is not currently documented, the color picker colors are stored in the $.fn.tColorPicker.defaults.data array. You can add a custom color like this:

$.fn.tColorPicker.defaults.data.push("f11ff1");
 
You can also remove all predefined colors and use your own, by clearing the array.

var colors = $.fn.tColorPicker.defaults.data;
while (colors.pop());
colors.push("ff1ff1"); 


Please note that the array stores six digit hex colors, without the hash-sign.

Hope this helps,
Alex Gyoshev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Editor
Asked by
Jillian
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or