Opened 6 years ago

Closed 6 years ago

# Pasting of tables from Word is broken

Reported by: Owned by: JasonWinnebeck jun66j5 normal TracWysiwygPlugin normal 0.10

### Description

Pasting tables from MS Word 2003 to Firefox 2 is broken. It is attempted but generates wiki that is very far off. Other environments not tested.

### comment:1 Changed 6 years ago by JasonWinnebeck

The problem appears only to be that a lot of extra newlines are generated in the source, which generates invalid wiki, so after editing is complete it doesn't "round trip" back to the editor. What's worse is that it looks correct on the screen until you save/preview/or select textarea.

### comment:2 Changed 6 years ago by JasonWinnebeck

r2777 seems to change this slightly, now the table generated with new lines when round tripped are terminated, but the generated wikitext is horribly corrupted. Newlines in tables should be converted to BR's, but more newlines are generated than there should be.

I create a 2x2 table in Word with cells a,b,c,d. The expected result is:

 a b c d

When I paste I see the appropriate view in the wysiwyg editor, but when I click textarea I see:

= heading =

|| a

|| b

||
|| c

|| d

||

text



Then I click wysiwyg, and see the table broken out vertically. Click textarea again, and now I see:

= heading =

|| a||

|| b||

||
|| c||

|| d||

||

text}}}

The roundtrip is stable at this point.

I also tested table paste from Excel. That works, except that it indents the table for some reason.


### comment:3 Changed 6 years ago by jun66j5

• Resolution set to fixed
• Status changed from new to closed

(In [2794]) fixed #2141 - a problem with pasting of tables from word.

### comment:4 Changed 6 years ago by JasonWinnebeck

Good, this works well now. There is still one problem remaining and that is when you use the "abcd" example from above, but when you put a new line in one of the tables, two BRs come out instead of the expected one.

### Modify Ticket

Change Properties