Harinath Kolli Harinath Kolli - 1 year ago 107
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

Answer Source

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

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