Opened 8 years ago

Closed 8 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)

5150.patch (2.1 KB) - added by Alfonso Martínez de Lizarrondo 8 years ago.
Proposed patch
5150_1.patch (3.0 KB) - added by Alfonso Martínez de Lizarrondo 8 years ago.
Revised patch
5150_2.patch (2.2 KB) - added by Alfonso Martínez de Lizarrondo 8 years ago.
Revised patch

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150.patch added

Proposed patch

comment:1 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added
Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

comment:2 Changed 8 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.3

Changed 8 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150_1.patch added

Revised patch

comment:3 Changed 8 years ago by Garry Yao

Keywords: Review- added; Review? removed

The '##(color)' change in config entries introduced a compatibility issue, we should somehow handle it.

Changed 8 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150_2.patch added

Revised patch

comment:4 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added; Review- removed

comment:5 Changed 8 years ago by Garry Yao

Keywords: Confirmed Review+ added; Review? removed

Just to make L128 more readable before commit, how about using

!colorName.match( /^#/ ) && ( colorName = '#' + colorName );

comment:6 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Fixed with [5230]

comment:7 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy