Opened 11 years ago

Closed 11 years ago

#10194 closed Bug (duplicate)

Table width problem

Reported by: Max Owned by:
Priority: Normal Milestone:
Component: Core : Tables Version:
Keywords: Cc:

Description

When i create table and set table width to "500" CKEditor put it in to style tag:

<table border="1" cellpadding="1" cellspacing="1" height="80" style="width: 500px;">

But if i resize the table by mouse (drag and drop right border), CKEditor change table width this way (in width tag):

<table border="1" cellpadding="1" cellspacing="1" height="80" width="582">

And this new value can't be changed in "Table Properties" dialog - if i want to set 90% here, the only way is to edit html code :(

Is there any way to set up CKEditor to put table width to same tag every time ?

P.S. I've check it in FF 19.0 on last version CKEditor in demo page here

Change History (4)

comment:1 Changed 11 years ago by Jakub Ś

Keywords: table width removed
Status: newpending
Version: 4.0.2

@cmax I was unable to reproduce this problem in CKEditor 4.x.

This is probably happening because CKEditor operates on styles while Firefox resize feature operates on attributes. Never the less when switching modes or taking data from editor using getData method this gets fixed. Last modified width (made with native resize or dialog) get assigned. The only place where you can see double attributes is Firebug.

Could you explain in detail what is the problem here, how to get reproduce it (step by step scenario) and what issue does it cause for you.

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

Never the less when switching modes or taking data from editor using getData method this gets fixed. Last modified width (made with native resize or dialog) get assigned. The only place where you can see double attributes is Firebug.

You get this fixed on getData() because you're testing this on 4.1RC. In this version we introduced the Advanced Content Filter which transforms width attribute to its preferred form - width style. However, inside the editable there still is a width attribute, so if you'll try to edit that table you'll notice that its width hasn't been loaded to the width input in table dialog. This is the main problem.

comment:3 Changed 11 years ago by Piotrek Koszuliński

Read more about Advanced Content Filter here http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter

Especially the last section is important: Content Transformations.

Note: we're now working on guides so this comment may become outdated pretty soon.

comment:4 Changed 11 years ago by Jakub Ś

Resolution: duplicate
Status: pendingclosed

@cmax I was unable to reproduce this problem in CKEditor 4.x.

My bad. @rainmar is right this particular problem was fixed in 4.1RC

@cmax your issue is in fact DUP of #9287.

Part about missing value in width field of table properties was reported here #10201

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