PDA

View Full Version : How can i change the palette colours in ckeditor?


acast
01-14-2012, 10:28 PM
Anybody knows how can i change the default palette colours of the ckeditor? Without clicking in More colours. I want to put there some colours that match perfect with my forum, and remove the ones that are useless for my forum.

LifesGreatestGift
01-15-2012, 03:28 AM
open file
./clientscript/ckeditor/plugins/colorbutton/plugin.js

On line 257 is where the colors are for the default palette.
It will look like thisCKEDITOR.config.colorButton_colors =
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696 969,' +
'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';
Each line is a line in the default palette. Just like on the palette, each line contains 8 colors.
So the code and the palette both have 5 rows of 8 colors.

So pick which color you'd like to replace in the palette, say the third color on the second row of the palette, on the second row, third color (colors separated by comma) its DAA520, so replace that with the hex color code you'd like displayed (no # needed).

Upload the modified file, and clear cache :)

acast
01-15-2012, 09:59 AM
open file
./clientscript/ckeditor/plugins/colorbutton/plugin.js

On line 257 is where the colors are for the default palette.
It will look like thisCKEDITOR.config.colorButton_colors =
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696 969,' +
'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';
Each line is a line in the default palette. Just like on the palette, each line contains 8 colors.
So the code and the palette both have 5 rows of 8 colors.

So pick which color you'd like to replace in the palette, say the third color on the second row of the palette, on the second row, third color (colors separated by comma) its DAA520, so replace that with the hex color code you'd like displayed (no # needed).

Upload the modified file, and clear cache :)

Thank you very much, friend!!:up:

How can i clean cach??

LifesGreatestGift
01-15-2012, 03:50 PM
browser cache, but chances are if you hit SHIFT+F5 or CTRL+F5 will clear up the files that need to be reloaded.

acast
01-16-2012, 10:43 AM
browser cache, but chances are if you hit SHIFT+F5 or CTRL+F5 will clear up the files that need to be reloaded.

It doesnt work for me. I prove in differents browsers, but i cant see in my forum the change i did in that file, i dont know why.:confused:

LifesGreatestGift
01-16-2012, 12:41 PM
did you upload and overwrite the existing file on your server?

acast
01-16-2012, 03:56 PM
did you upload and overwrite the existing file on your server?
Of course. And if i go to the FTP and download the file, is correct, but it seems to take the information of another file. Perhaps is something in my style?

LifesGreatestGift
01-16-2012, 05:49 PM
try making the same edits in ./clientscript/ckeplugins/vbtextcolor/plugin.js around line 317

acast
01-17-2012, 09:46 AM
try making the same edits in ./clientscript/ckeplugins/vbtextcolor/plugin.js around line 317Still doesnt work, friend. Is working for you?

getwhatuask4
04-19-2014, 10:25 AM
Just in case anyone else stumbles upon this post seeking the same thing, look here (https://vborg.vbsupport.ru/showthread.php?p=2493778#post2493778) for the resolution.