Harinath Kolli
Harinath Kolli

Reputation: 43

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

Upvotes: 1

Views: 1053

Answers (1)

Harinath Kolli
Harinath Kolli

Reputation: 43

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

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

Upvotes: 1

Related Questions