Is it possible to add custom colors to the font color selection box of the Editor?
1 Answer, 1 is accepted
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.