Display only few desired colors in a CKEditor palette
ckeditor, colors, php
Solution
All colors are defined in ckeditor/ckeditor.js. This is a minified file, so it is hard to read. If you perform a search on colorButton_colors, you will find the following definition:
colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
Just remove, or add colors you want.
Hope that helps!
Problem
The default palette in a CKEditor windows is like this: Is it possible to select only a few colors (I just need three of them) instead of showing them all? I checked the config.js but it doesn't seems possible to set colors limit from there. Is this possible?