Harinath Kolli Harinath Kolli - 5 months ago 35
Javascript Question

How to change the background color of container in CKEditor with color palette

How to change the color of the container with inline ckeditor from the list of colors.I know we have "colorbutton" plugin to change the text color and background color of block element but I need to change the entire container color.
Here is the image about my requirement


Modified the colorbutton button ckeditor plugin. Add the following conditions in renderColors() method.

if(type != 'back'){
 editor.applyStyle( new CKEDITOR.style( colorStyle, { color: color } ) );