I have a CKEditor, that when an error validation is detected on the CKEditor, I change the uiColor to red (in line with other controls on the form).
I can change the uiColor using the following client side jquery code:
CKEDITOR.instances['id_achievement_description'].config.uiColor = '{{ ckeditor_error_colour }}';
However, when I reset the form (clear all values and clear all error messages), I am unable to reset the CKEditor uiColor back to the default color.
The following server side code does restore the default color of the CKEditor, but the destroy function deletes the instance of the CKEditor:
CKEDITOR.instances['id_achievement_description'].destroy();
CKEDITOR.replace('id_achievement_description', { uiColor : "#AADC6E"} );
However, using the destroy() function deletes the instance of the CKEditor and I need to change the color of the CKEditor to the default colour without the destroy function. Using the above code without the destroy function does not reset the CKEditor.
How do I reset the color of the CKEditor without using the destroy function?
