Bring Original Redactor Colors back

guclusat

Tanınmış Üye
Süper Moderatör
Bring Original Redactor Colors back

To do this, it requires a simple JavaScript edit (will need reapplied each upgrade - I may turn this into an add-on later on).

This change will accomplish this:

redactor-before.png

In /js/redactor/redactor.js find the following code:

Kod:
   colors: [
                '#ffffff', '#ff9999', '#ffcc99', '#ffff99', '#ccff99', '#99ff99', '#99ffcc', '#99ffff', '#99ccff', '#9999ff', '#cc99ff', '#ff99ff', '#ff99cc',
                '#bfbfbf', '#ff4d4d', '#ffa64d', '#ffff4d', '#a6ff4d', '#4dff4d', '#4dffa6', '#4dffff', '#4da6ff', '#4d4dff', '#a64dff', '#ff4dff', '#ff4da6',
                '#808080', '#ff0000', '#ff8000', '#ffff00', '#80ff00', '#00ff00', '#00ff80', '#00ffff', '#0080ff', '#0000ff', '#8000ff', '#ff00ff', '#ff0080',
                '#404040', '#b30000', '#b35900', '#b3b300', '#59b300', '#00b300', '#00b359', '#00b3b3', '#0059b3', '#0000b3', '#5900b3', '#b300b3', '#b30059',
                '#000000', '#660000', '#663300', '#666600', '#336600', '#006600', '#006633', '#006666', '#003366', '#000066', '#330066', '#660066', '#660033'
            ],
            colorWidth: 247,

Replace it with the following:


Kod:
colors: [
'#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00',
'#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca',
'#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694',
'#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314',
'#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100',
'#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'],
            colorWidth: 210,

This will revert the selection back to the original Redactor colors, and have them align correctly. (If colorWidth change has no effect, I have CSS from @Shelley to align it correctly).

I wish you success.
 
Geri
Yukarı