Ticket #5150: 5150_1.patch
File 5150_1.patch, 3.0 KB (added by , 14 years ago) |
---|
-
_source/plugins/colorbutton/plugin.js
118 118 if ( ( i % 8 ) === 0 ) 119 119 output.push( '</tr><tr>' ); 120 120 121 var colorCode = colors[ i ]; 121 var parts = colors[ i ].split( '/' ), 122 colorName = parts[ 0 ], 123 colorCode = parts[ 1 ] || colorName; 124 122 125 var colorLabel = editor.lang.colors[ colorCode ] || colorCode; 123 126 output.push( 124 127 '<td>' + 125 128 '<a class="cke_colorbox" _cke_focus=1 hidefocus=true' + 126 129 ' title="', colorLabel, '"' + 127 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\' #', colorCode, '\',\'', type, '\'); return false;"' +130 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' + 128 131 ' href="javascript:void(\'', colorLabel, '\')">' + 129 132 '<span class="cke_colorbox" style="background-color:#', colorCode, '"></span>' + 130 133 '</a>' + … … 166 169 /** 167 170 * Defines the colors to be displayed in the color selectors. It's a string 168 171 * containing the hexadecimal notation for HTML colors, without the "#" prefix. 172 * 173 * Since 3.3: A name may be optionally defined by prefixing the entries with the 174 * name and the slash character. For example, "FontColor1/FF9900" will be 175 * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1". 169 176 * @type String 170 177 * @default '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' 171 178 * @example 172 179 * // Brazil colors only. 173 180 * config.colorButton_colors = '00923E,F8C100,28166F'; 181 * @example 182 * config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00' 174 183 */ 175 184 CKEDITOR.config.colorButton_colors = 176 185 '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' + … … 187 196 * config.colorButton_foreStyle = 188 197 * { 189 198 * element : 'span', 190 * styles : { 'color' : '# (color)' }199 * styles : { 'color' : '##(color)' } 191 200 * }; 192 201 */ 193 202 CKEDITOR.config.colorButton_foreStyle = 194 203 { 195 204 element : 'span', 196 styles : { 'color' : '# (color)' },205 styles : { 'color' : '##(color)' }, 197 206 overrides : [ { element : 'font', attributes : { 'color' : null } } ], 198 207 199 208 // Fore color style must be applied inside links instead of around it. … … 211 220 * config.colorButton_backStyle = 212 221 * { 213 222 * element : 'span', 214 * styles : { 'background-color' : '# (color)' }223 * styles : { 'background-color' : '##(color)' } 215 224 * }; 216 225 */ 217 226 CKEDITOR.config.colorButton_backStyle = 218 227 { 219 228 element : 'span', 220 styles : { 'background-color' : '# (color)' }229 styles : { 'background-color' : '##(color)' } 221 230 };