Ticket #7604 (closed Bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

style definition overrides does not allow to override elements with the same name

Reported by: kawollek Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.5.3
Keywords: style definition overrides Cc:

Description

while adapting the font-plugin i found, that it is not possible to override an element with the same name:

trying something like this has no effect:

CKEDITOR.config.font_style =
	{
		element		: 'span',
		styles		: { 'font-family' : '#(family)' },
		overrides	: [ { element : 'span', attributes : { 'class' : 'myClass' } } ]
	};

there is an if-statement in the style-Plugin, that causes this problem. In

function removeFromInsideElement( style, element )

you will find this:

if ( overrideElement != style.element )

Removing this allows to override elements with the same name. I changed this for me an found no sideeffects while testing. Would it be possible to change this?

Change History

comment:1 Changed 3 years ago by alfonsoml

  • Status changed from new to closed
  • Resolution set to duplicate

Dup of #7492 (and #7498)

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