[wp-trac] [WordPress Trac] #27909: Pasting Tables from Excel Strips Tables
WordPress Trac
noreply at wordpress.org
Tue Apr 22 05:00:27 UTC 2014
#27909: Pasting Tables from Excel Strips Tables
--------------------------+--------------------
Reporter: DH-Shredder | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9.2
Component: TinyMCE | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Comment (by netweb):
Some testing with Excel 2013 Desktop App, Excel Online and Windows 8.1
Replying to [comment:6 celloexpressions]:
> Testing with Office 365 Excel (2013+) on Windows 8.1, cannot reproduce
(data is pasted as a table with the corresponding html and necessary
formatting).
Same, cannot reproduce with the same config, works as expected with a new
post in WordPress or the TinyMCE [http://www.tinymce.com/tryit/basic.php
demo].
Replying to [comment:6 celloexpressions]:
> Testing with the Excel Online web-app, was able to reproduce: data
pasted as plain text with spaces between cells and line breaks between
rows.
This is expected behaviour, when coping a range of cells (Copy/CTRL-C) the
clipboard does NOT receive any HTML formatting in the clipboard from
Chrome or IE 11 (There appears to be some extra formatting and/or
interpretations of that formatting when pasting the contents back into the
online spreadsheet to interpret each 'tab' as an individual cell)
{{{
1 5 2 5
8 2 1 3
}}}
Replying to [comment:10 DH-Shredder]:
> This is definitely from the 'paste' plugin, or some way we're using
those filters.
> With the 'paste' plugin disabled, the paste works as expected.
How do I disable just the 'paste' plugin? I'd like to see what results I
get, I expect the 'full html source per below'.
Replying to [comment:11 DH-Shredder]:
> More details: Can reproduce in Chrome or Safari on Mac, but works fine
in Firefox.
I am not sure how or if you can view the raw HTML source of the clipboard
on a Mac but if you can comparing it to what I have in this
[https://gist.github.com/ntwb/dc85d30572c1e8ff4101 gist] would help find
what element/character/string is causing the issue with TinyMCE 'paste'
plugin.
----
The HTML source of the clipboard from Excel 2013 before being stripped by
TinyMCE 'paste' plugin:
(Complete HTML source including namespace and styles
[https://gist.github.com/ntwb/dc85d30572c1e8ff4101 here])
{{{
<table border=0 cellpadding=0 cellspacing=0 width=256 style='border-
collapse: collapse;width:192pt'>
<!--StartFragment-->
<col width=64 span=4 style='width:48pt'>
<tr height=20 style='height:15.0pt'>
<td height=20 align=right width=64
style='height:15.0pt;width:48pt'>1</td>
<td align=right width=64
style='width:48pt'>5</td>
<td align=right width=64
style='width:48pt'>2</td>
<td align=right width=64
style='width:48pt'>5</td>
</tr>
<tr height=20 style='height:15.0pt'>
<td height=20 align=right
style='height:15.0pt'>8</td>
<td align=right>2</td>
<td align=right>1</td>
<td align=right>3</td>
</tr>
<!--EndFragment-->
</table>
}}}
I suspect there are a few differences in the clipboard content between Mac
Excel 2011 and Windows Excel 2013.
I also added the HTML source for the same table from Word 2013 in the
[https://gist.github.com/ntwb/dc85d30572c1e8ff4101 gist], and as you can
see there is quite a big difference yet both work as expected for me and a
copy of the Excel 2013 document I used
[https://i.cloudup.com/wKlDfGgpnV.xlsx here].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27909#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list