-
Notifications
You must be signed in to change notification settings - Fork 200
Add a feature for SVG support in the Async Clipboard API #1727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We added this in #1703. (I didn't realize how new this is, will fix a regular web papercut for me!) |
|
I'm going to close this as a duplicate of #1703. If you still think this should be a standalone feature, please merge main into your branch and reopen for discussion/review. Thank you! |
|
I don't think web devs know that the clipboard API doesn't support all formats by default. I don't think many of them know that it only supports text, html, and png out of the box. And, on top of this, that browsers sanitize the html and png data to avoid security problems, so you don't even get to read the same HTML code that you wrote in the clipboard earlier. Because of this fact, and because the addition of SVG, and web custom formats happened much later than the bulk of the clipboard API, I would still prefer to track these as separate features. I think splitting these gives a better chance for devs to understand the limits of the clipboard API, and the additional features they need to achieve their particular use case (for example, a Figma-like app would want to check the Baseline status for both a clipboard, and a clipboard-svg feature. Or, an excel-like app would want to check the status of a clipboard-web-custom-format feature, to know whether they can pass their custom spreadsheet+macro code, unsanitized, in the clipboard, between a native and a web app). |
|
OK, please reopen after you've merged in main and resolved the errors. The existing PR will fail on merge, due to duplicate keys. |
|
Here is a summary of my changes, in line with my understanding of the clipboard API:
|
Co-authored-by: Dietrich Ayala <50103+autonome@users.noreply.github.com>
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicking on the names and descriptions, but this looks like a good forward. Thank you, Patrick!
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
See https://blogs.windows.com/msedgedev/2024/07/11/seamless-svg-copy-paste-on-the-web/ for some background on this.