Opened 7 years ago

Closed 7 years ago

#5150 closed New Feature (fixed)

colorButton_colors doesn't allow to specify "name" and color

Reported by: alfonsoml Owned by: alfonsoml
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 alfonsoml 7 years ago.
Proposed patch
5150_1.patch (3.0 KB) - added by alfonsoml 7 years ago.
Revised patch
5150_2.patch (2.2 KB) - added by alfonsoml 7 years ago.
Revised patch

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by alfonsoml

Proposed patch

comment:1 Changed 7 years ago by alfonsoml

  • Keywords Review? added
  • Owner set to alfonsoml
  • Status changed from new to assigned

comment:2 Changed 7 years ago by fredck

  • Milestone set to CKEditor 3.3

Changed 7 years ago by alfonsoml

Revised patch

comment:3 Changed 7 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 7 years ago by alfonsoml

Revised patch

comment:4 Changed 7 years ago by alfonsoml

  • Keywords Review? added; Review- removed

comment:5 Changed 7 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 7 years ago by alfonsoml

Fixed with [5230]

comment:7 Changed 7 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy