Opened 16 years ago
Closed 16 years ago
#5150 closed New Feature (fixed)
colorButton_colors doesn't allow to specify "name" and color
| Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | Alfonso Martínez de Lizarrondo |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.3 |
| Component: | Core : Styles | Version: | 3.1 |
| Keywords: | Confirmed Review+ | Cc: |
Description
This is not related to showing a custom text for each color as that can be done including the proper entries in editor.lang.colors
Instead, it's related to the functionality of FCKeditor to specify
FCKConfig.FontColors = 'ff9900/FontColor1,0066cc/FontColor2,ff0000/FontColor3' ;
FCKConfig.CoreStyles.Color =
{
Element : 'span',
Attributes : { 'class' : '#("Color")' },
Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]
} ;
Now the only option seems to be to use something like
colorButton_colors : 'ff9900,0066cc,ff0000',
colorButton_foreStyle :
{
element : 'span',
attributes : { 'class' : 'Color(color)' }
},
but that requires to use class names like Colorff9900, instead of being able to specify whatever they need.
Attachments (3)
Change History (10)
Changed 16 years ago by
| Attachment: | 5150.patch added |
|---|
comment:1 Changed 16 years ago by
| Keywords: | Review? added |
|---|---|
| Owner: | set to Alfonso Martínez de Lizarrondo |
| Status: | new → assigned |
comment:2 Changed 16 years ago by
| Milestone: | → CKEditor 3.3 |
|---|
comment:3 Changed 16 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The '##(color)' change in config entries introduced a compatibility issue, we should somehow handle it.
comment:4 Changed 16 years ago by
| Keywords: | Review? added; Review- removed |
|---|
comment:5 Changed 16 years ago by
| Keywords: | Confirmed Review+ added; Review? removed |
|---|
Just to make L128 more readable before commit, how about using
!colorName.match( /^#/ ) && ( colorName = '#' + colorName );
comment:7 Changed 16 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

Proposed patch