Re: [w3c/editing] Remove write and add more details on read. (PR #456)

@snianu commented on this pull request.



>  
 
 ## Author:
 *   ansollan@microsoft.com
 *   snianu@microsoft.com
 
 ## Introduction
-Using DataTransfer object's setData and async clipboard write method, there are interop differences in how the HTML content is sanitized and written to the clipboard. It'd be beneficial for the web authors if async clipboard and setData APIs provide similar level of fidelity of HTML content during copy & paste operations so round tripping is possible without any interop differences such as losing formats, meta tags etc.
-If we use the built-in sanitizer that produces an HTML fragment, the styles that get inlined bloat the payload and [strip out the custom styles](https://drive.google.com/file/d/1Nsyp1rUKc_NF4l0n-O05snAKabHAKeiG/view) inserted by sites like Excel online that are used to preserve excel specific semantics.
+HTML content is essential for supporting copy/paste operation of high fidelity content from native apps to web sites and vice versa, especially in sites supporting document editing. DataTransfer object's `getData` and async clipboard `read()` methods have interop differences in how the HTML content is sanitized during a paste operation. The `getData` method returns unsanitized HTML content, but the `read()` method uses the browser's sanitizer to strip out content (ex. global `<style>`s, `<script>`s, `<meta>` tags) from the HTML markup which results in format loss, bloating of payload due to inlining of styles etc.

Remove etc and added examples for all the problems mentioned.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/pull/456#discussion_r1378089601
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/pull/456/review/1707116964@github.com>

Received on Tuesday, 31 October 2023 19:40:41 UTC