Opened 9 years ago

Last modified 9 years ago

#12656 review Bug

Unnecessary space added to table class attribute

Reported by: Marek Lewandowski Owned by: Marek Lewandowski
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

It semms that an extra space is added at the begining of class attribute of tables in the editable.

  1. Open any sample with CKEditor. (i.e. samples/replacebyclass.html)
  2. Evaluate following code using JavaScript console:
(function() {
	var editor = CKEDITOR.instances.editor1;
	// When data is ready, log the class attribute for first table in editable.
	editor.once( 'dataReady', function() {
		console.log( '"%s"', editor.editable().findOne( 'table' ).getAttribute( 'class' ) );
	} );
	
	editor.setData( '<table><tr><td></td><td>foo</td></tr></table>' );
}());

Expected result:

Following value should be logged:

"cke_show_border"

Current result:

We have a class with an extra space at the beginning.

" cke_show_border"

Additional info:

  1. It's caused by the showborders plugin.

Change History (2)

comment:1 Changed 9 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: newreview

I have already proposed a solution, since this fix is required in our side project.

Solution pushed to branch: t/12656.

comment:2 Changed 9 years ago by Piotrek Koszuliński

Instead of defining the allowedContent in tests, just add the toolbar plugin.

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