﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13237	styleSet - removing class attribute when switching style	Ivan Čentéš		"I'm having troubles setting up my styleSet. I have (for simplicity) 2 styles:

{{{
CKEDITOR.stylesSet.add( 'styles-styles-datart', [
	{ name: 'Paragraph', element: 'p' },
	{
		name: 'Box with border',
		element: 'div',
		attributes: {
			'class': 'box-with-border'
		}
	}
]);
}}}

When I then use the Styles combo to change a block to a ""Box with border"", everything is ok, the class name is there.

But when I want to change the block back to a normal Paragraph, it leaves the class value without changes:

{{{
<p class=""box-with-border"">...</p>
}}}

I tried various configurations of the Paragraph style, but none worked (well one worked, but it is quite ugly):

1. { name: 'Paragraph', ..., {attributes : {'class' : null}} } - this produces <p class=""null"">
2. { name: 'Paragraph', ..., {attributes : {'class' : false}} } - this removes the Paragraph style from the Combo completely
3. { name: 'Paragraph', ..., {attributes : {'class' : ''}} } - empty string removes the Paragraph style from the Combo also
4. { name: 'Paragraph', ..., {attributes : {'class' : ' '}} } - string with 1 space character. Only this configuration works the way I wanted

Is there some other, cleaner way to do this?"	Bug	closed	Normal		Core : Styles	4.4.5	duplicate		
