I am using the Kendo UI Editor and I want to choose which color will appear in the font and background color palettes. Or another alternative is letting the user choose from a custom color picker.
I found examples on forums, but they all use older version of Kendo 2012. The latest version 2016 R3 does not know such a definition: kendo.ui.editor.ColorPicker.fn.options.colors
It says it is undefined:
Uncaught TypeError: Cannot read property 'fn' of undefined
Is there a way to do this? I looked in the forums and saw this answer but this isn't working.
kendo.ui.editor.ColorPicker.fn.options.colors = ["c3c3c3", "b97a57", "ffaec9", "ffc90e", "efe4b0", "b5e61d", "99d9ea", "7092be", "c8bfe7"];
Update: The solution work with latest version of kendo UI after user question was modified
I have discussed the solution using latest version of kendo on this blog . Please click on link below to navigate to solution.
Kendo UI Editor - Change default colors of font color picker and background color picker
In brief the soultion in the link is this code:
Old : This Solution works but only with kendo 2012 version.
Here is the working live demo link - Editor color picker
HTML
JavaScript File