- From: pavelstulyq1999 <notifications@github.com>
- Date: Fri, 04 Jun 2021 02:58:33 -0700
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/clipboard-apis/issues/149@github.com>
I am trying to get data copied from exel. in html this is a table and styles separately. when getting html / text i see <table border = "0" cellpadding = "0" cellspacing = "0" width = "128" style = "border-collapse: collapse; width: 96pt "> <colgroup> <col width = "64" span = "2" style = "width: 48pt"> </colgroup> <tbody> <tr height = "20" style = "height: 15.0pt"> <td height = "20" class = "xl70" align = "right" width = "64" style = "height: 15.0pt; width: 48pt "> 11 </td> <td class = "xl65" align = "right" width = "64" style = "width: 48pt"> 12 </td> </tr> <tr height = "20" style = "height: 15.0pt"> <td height = "20" class = "xl66" align = "right" style = "height: 15.0pt"> 21 </td> <td class = "xl67" align = "right"> 22 </td> </tr> <tr height = "20" style = "height: 15.0pt"> <td height = "20" class = "xl68" align = "right" style = "height: 15.0pt"> 31 </td> <td class = "xl69" align = "right"> 32 </td> </tr> <! - EndFragment -> </tbody> </table> Accordingly, the xlXX style classes are lost somewhere in the clipboard. Moreover, when I receive data from the event "paste", then I see the full html. Js code using - const clipboardItems = await navigator.clipboard.read (); for (const clipboardItem from clipboardItems) { for (const type for clipboardItem.types) { const blob = wait for clipboardItem.getType (type); console.log (URL.createObjectURL (blob)); const td = pending (new answer (blob)). text (); console.log (blob.isClosed); console.log (td); -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/clipboard-apis/issues/149
Received on Friday, 4 June 2021 09:59:12 UTC