Opened 10 years ago
Closed 10 years ago
#12914 closed Bug (fixed)
Copy/Paste Table broken in DIV based editor
Reported by: | Troy Rhinehart | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.5.0 Beta |
Component: | General | Version: | 4.0 Beta |
Keywords: | Firefox | Cc: |
Description
Using CKEditor demos as example, copying and pasting a table works in iframe demo (http://ckeditor.com/demo#standard) but is broken in div demo (http://ckeditor.com/demo#div). Seeing the same issue in our production implementation using version 4.4.6.
Attachments (2)
Change History (8)
comment:1 Changed 10 years ago by
Keywords: | Firefox added |
---|---|
Status: | new → confirmed |
Version: | → 4.0 Beta |
comment:2 Changed 10 years ago by
Kuba, can you check it on the major branch? AFAICS it works fine there. If so, then please set milestone to 4.5.0.
Changed 10 years ago by
Changed 10 years ago by
comment:3 Changed 10 years ago by
comment:4 Changed 10 years ago by
Milestone: | → CKEditor 4.5.0 |
---|
Ok, I forgot that we haven't yet plugged the new methods for getting selected HTML. So now the clipboard contains a set of <td>
without the table structure, hence the weird results. And this will be fixed. Although... the result may stil bel unexpected due to the fact that on Firefox this selection consists of 6 ranges and while pasting we're only handling the first one.
Anyway, I'm assigning milestone 4.5.0 so we won't forget to check this case once everything is ready. However, if the result will still be slightly odd we're not going to work on this in 4.5.0, because it's a huge task itself to handle pasting tables into tables.
comment:5 Changed 10 years ago by
Perhaps when all cells are selected we could expand selection to whole table? I'm asking about this because when you click on table in element's path and then copy/paste table, it works.
However, if the result will still be slightly odd we're not going to work on this in 4.5.0, because it's a huge task itself to handle pasting tables into tables.
Perhaps we don't need to fix "the whole world" for this ticket but only add extra "if". After all user don't case about specification but the end result.
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
Ok, I checked this again and the result now is as good as we can make it without special table handling on Chrome:
<table border="1" cellpadding="1" cellspacing="1" style="width:500px"> <tbody> <tr> <td> <table border="1" cellpadding="1" cellspacing="1" style="width:500px"> <tbody> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <p> </p>
And the result is perfect on Firefox:
<table border="1" cellpadding="1" cellspacing="1" style="width:500px"> <tbody> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> <p> </p>
Problem can be reproduced on Firefox from CKEditor 4.0 beta.
To reproduce:
Result: table has more cells in first row.