Ticket #785 (closed Bug: fixed)
Applying a style to multiple table cells corrupts the table
|Reported by:||snies@…||Owned by:|
|Priority:||Normal||Milestone:||FCKeditor 2.5 Beta|
Description (last modified by martinkou) (diff)
When editing a large table a common use case is for the user to select multiple rows and/or cells and then apply formatting. Applying a font or changing the font size works as expected - the change is applied to the contents of each selected cell individually.
However, applying a style to multiple cells does NOT work as expected. For example, I created a 3x2 table and populated it with test data. I then selected the lower 4x4 grid and applied a style. The problem is that a single <span> tag is generated to span multiple <td> tags. The end result is that the table structure is corrupted.
Following is the resulting HTML from this scenario:
<table width="200" cellspacing="1" cellpadding="1" border="1" align="" summary=""> <tbody> <tr> <td>Steve</td> <td>Nies</td> </tr> <tr> <span class="normal"> <td>Sheri</td> <td>Nies</td> <td>Jenny</td> <td>Nies</td> </span> </tr> <tr> </tr> </tbody> </table>
Notice that the single <span> tag encompasses multiple <td> tags (i.e., the cells that were selected by the user).