[wp-trac] [WordPress Trac] #27909: Pasting Tables from Excel Strips Tables

WordPress Trac noreply at wordpress.org
Wed Apr 23 06:14:23 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):

 Replying to [comment:13 DH-Shredder]:
 > Replying to [comment:12 netweb]:
 > > 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.
 >
 > Sure, here you go, using your Excel file:
 https://gist.github.com/getsource/11197359
 Using my Excel file did it work when pasting into a new post?

 Can you post the HTML source of your Excel file so we can check if the
 'native' generated source is different.

 Replying to [comment:13 DH-Shredder]:
 > More details: Can reproduce in Chrome or Safari on Mac, but works fine
 in Firefox.
 Is it the same result with each browser when pasting into the TinyMCE
 demo? http://www.tinymce.com/tryit/basic.php

 Replying to [comment:13 DH-Shredder]:
 > Replying to [comment:12 natweb]:
 > > 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'.
 >
 > I disabled it directly from within `wp-includes/class-wp-editor.php`,
 but you can also filter the array in `tiny_mce_plugins`.

 I just disabled the 'paste' plugin the same way as above and when pasting
 from my Excel file and per these results we want to keep the 'paste'
 plugin enabled to strip the extra formatting but find out what is
 different and why it only works with Firefox on a Mac.

 excel-27909-no-paste-plugin.html :
 {{{
 #!text/html
 <table style="border-collapse: collapse; width: 192pt;" border="0"
 width="256" cellspacing="0" cellpadding="0">
 <colgroup><col style="width: 48pt;" span="4" width="64" /> </colgroup>
 <tbody>
 <tr style="height: 15.0pt;">
 <td style="height: 15.0pt; width: 48pt;" align="right" width="64"
 height="20">1</td>
 <td style="width: 48pt;" align="right" width="64">5</td>
 <td style="width: 48pt;" align="right" width="64">2</td>
 <td style="width: 48pt;" align="right" width="64">5</td>
 </tr>
 <tr style="height: 15.0pt;">
 <td style="height: 15.0pt;" align="right" height="20">8</td>
 <td align="right">2</td>
 <td align="right">1</td>
 <td align="right">3</td>
 </tr>
 </tbody>
 </table>
 }}}
 excel-27909-with-paste-plugin.html:
 {{{
 #!text/html
 <table border="0" width="256" cellspacing="0" cellpadding="0">
 <colgroup><col span="4" width="64" /> </colgroup>
 <tbody>
 <tr>
 <td align="right" width="64" height="20">1</td>
 <td align="right" width="64">5</td>
 <td align="right" width="64">2</td>
 <td align="right" width="64">5</td>
 </tr>
 <tr>
 <td align="right" height="20">8</td>
 <td align="right">2</td>
 <td align="right">1</td>
 <td align="right">3</td>
 </tr>
 </tbody>
 </table>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27909#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list