Re: [w3c/clipboard-apis] Can`t get full html/text from clipboard (#149)

@pavelstulyq1999 on all browsers except Safari you should be able to read the original HTML from Excel using the [ClipboardEvent](https://w3c.github.io/clipboard-apis/#clipboard-event-interfaces) API (as you've mentioned):

```javascript
addEventListener("paste", e => {
    consol.log(e.clipboardData.getData("text/html"))
})
```

@snianu is working to enable this for the async clipboard API as well in Chromium browsers, but per [this issue](https://github.com/w3c/clipboard-apis/issues/150#issuecomment-994181053), which was just closed, I don't think we're going to standardize whether and how browsers should sanitize HTML content before providing it to authors - so I'm not sure you'll be able to use the async version of the APIs outside of a future version of Chromium to support this scenario.

@whsieh as FYI

-- 
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#issuecomment-994230565

Received on Wednesday, 15 December 2021 02:25:41 UTC