Re: [w3c/editing] Add unsanitized html read/write doc. (PR #420)

@snianu commented on this pull request.



> +async () => {
+try {
+      const html_text = new Blob([
+                  '<html><head><meta http-equiv=Content-Type content=\"text/html; charset=utf-8\"><meta name=ProgId content=Excel.Sheet><meta name=Generator content=\"Microsoft Excel 15\"><style>display:none</style></head></html>'], {type: 'text/html'});
+navigator.clipboard.write([
+                new ClipboardItem({
+                    "text/html": html_text
+                }),
+]);
+} catch(e) {
+}
+}
+
+```
+
+## Proposal

I didn't want to duplicate all the algorithms from the clipboard API spec here as this is a minor change in `read()` & `write()` methods, and having duplicate content would most certainly result in docs going out of sync and increase confusion among web developers and UAs.
However, since this isn't an official document for clipboard APIs and has just the implementation in Chromium browser(Firefox & Safari were opposed to this feature), I can mention the IDL changes and add links to the clipboard spec for the algorithms that we are using in this feature. Thoughts?

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

Message ID: <w3c/editing/pull/420/review/1351471516@github.com>

Received on Tuesday, 21 March 2023 22:24:48 UTC