-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[WIP] Sort out cut/copy/paste issues #1023
Conversation
… fallback to native implementations
Well, can't test with Browserstack since it messes with the clipboard, but I will take this as a sign the APIs are there since at least 2014, so that's that :) We just need to do a regression test (Especially interested in IE/Edge) and I think we're good to go. |
It seems the chromium issue was marked as WontFix, in which case |
Hey @danburzo I just commented in the original issue. It feels like we're dealing with multiple separate things here in this PR that we should potential detangle from each other.
For (3) I haven't investigated as much as you, so I'm not as sure where the limitations are, but is there no way for us to fix that as currently architected? Let me know what you think. |
As of #3093 (which was just merged), I believe this issue is no longer applicable, because a lot has changed. I'm going through and closing out any potential issues that are not out of date with the overhaul. Thanks for understanding. |
Re: #734 (Work in progress)
References:
Basically I'm swapping the "move into contenteditable div, select it, and let the browser copy the contents" technique with manually setting the clipboard data for
text/plain
andtext/html
.There's an opportunity here to plugin in a Slate HTMLSerializer and PlainSerializer if the author wants to make the clipboard data conform to a certain schema. (There's a discussion about this, I think?) — DONE ✓
What still needs to be done (any help appreciated):
setData()
and whether we can be sure the data has been set. (Otherwise, browsers silently ignoringsetData()
will not be able to copy anything to the clipboard) — and fall back to the div technique if necessary