Hi Ashley,
The custom colors added to the color picker can be retrieved and modified easily trough Client-side implementation. The editor's Client-side API has the methods
get_colors(), which returns the colors as array of string values and
set_colors(), which uses an array of strings as argument.
Saving the data from the color picker could be achieved by manipulating a hidden input field, using database, session or local storage. You could then pass this information to the server and store it, for example in a database. Note that using the
RadEditor1.Colors.Add("#ffcccc"); will clear all predefined colors and due to the Client-side nature of the color picker they cannot be retrieved on any Page event.
This is an example how to save and retrieve information for the colors using the localStorage:
More information about the events you could follow these two articles:
OnClientCommandExecuted
OnClientLoad
Regards,
Ianko
Telerik
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 RadControls for ASP.NET AJAX, subscribe to the
blog feed now.