Copy and Paste: Tables

  • Ok I have a problem with copying and pasting tables from a previous post, this problem is replicated here.


    I am using windows 8.1 and Chrome Version 47.0.2526.111 m


    What happens is that when you copy and paste table is loses the last column in the last row and no longer works. I know how to get around it but it doesn't really help with people not confident using BBCode



    1 2 3 4 5
    2
    3
    4
    5
  • All right, I've somehow missed that the table was actually copied from a post and not from within an editor window. I have no idea why I've assumed the editor as the source, but whatever.


    So, I was actually able to reproduce this, but sadly it doesn't help me at all. I've tried it with the example and when the lower right column is empty, Chrome will simply ignore this column as if it didn't exist. I've checked this by both examining the raw data passed in by Chrome when pasting and setting up a simple demo to try it.


    https://jsfiddle.net/9rs29f1p/1/


    This demo features nothing but a contenteditable area and a button to clear it again, no other libraries are loaded. The result from the paste is exactly what is provided by the browser, completely unmodified.


    Try it with these two tables:


    1 2 3 4 5
    2
    3
    4
    5


    The table below will work perfectly fine.

    1 2 3 4 5
    2
    3
    4
    5 X

    Alexander Ebert
    Senior Developer WoltLab® GmbH