Opened 15 years ago

Closed 15 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.

Find this issue on GitHub

Change History (10)

Changed 15 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150.patch added

Proposed patch

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

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

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.3

Changed 15 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150_1.patch added

Revised patch

comment:3 Changed 15 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 15 years ago by Alfonso Martínez de Lizarrondo

Attachment: 5150_2.patch added

Revised patch

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

Keywords: Review? added; Review- removed

comment:5 Changed 15 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 15 years ago by Alfonso Martínez de Lizarrondo

Fixed with [5230]

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

Resolution: fixed
Status: assignedclosed
Find this issue on GitHub
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy