Changeset 5230
- Timestamp:
- 03/09/10 22:42:20 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/colorbutton/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r5229 r5230 41 41 <ul> 42 42 <li><a href="http://dev.fckeditor.net/ticket/4478">#4478</a> : Enable the SelectAll command in source mode.</li> 43 <li><a href="http://dev.fckeditor.net/ticket/5150">#5150</a> : Allow names in the CKEDITOR.config.colorButton_colors setting.</li> 43 44 </ul> 44 45 <p> -
CKEditor/trunk/_source/plugins/colorbutton/plugin.js
r5221 r5230 123 123 output.push( '</tr><tr>' ); 124 124 125 var colorCode = colors[ i ]; 125 var parts = colors[ i ].split( '/' ), 126 colorName = parts[ 0 ], 127 colorCode = parts[ 1 ] || colorName; 128 129 // The data can be only a color code (without #) or colorName + color code 130 // If only a color code is provided, then the colorName is the color with the hash 131 if (!parts[1]) 132 colorName = '#' + colorName; 133 126 134 var colorLabel = editor.lang.colors[ colorCode ] || colorCode; 127 135 output.push( … … 129 137 '<a class="cke_colorbox" _cke_focus=1 hidefocus=true' + 130 138 ' title="', colorLabel, '"' + 131 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\' #', colorCode, '\',\'', type, '\'); return false;"' +139 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' + 132 140 ' href="javascript:void(\'', colorLabel, '\')"' + 133 141 ' role="option" aria-posinset="', ( i + 2 ), '" aria-setsize="', total, '">' + … … 173 181 * Defines the colors to be displayed in the color selectors. It's a string 174 182 * containing the hexadecimal notation for HTML colors, without the "#" prefix. 183 * 184 * Since 3.3: A name may be optionally defined by prefixing the entries with the 185 * name and the slash character. For example, "FontColor1/FF9900" will be 186 * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1". 175 187 * @type String 176 188 * @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' … … 178 190 * // Brazil colors only. 179 191 * config.colorButton_colors = '00923E,F8C100,28166F'; 192 * @example 193 * config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00' 180 194 */ 181 195 CKEDITOR.config.colorButton_colors =
Note: See TracChangeset
for help on using the changeset viewer.
