-
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
Safari paste handling and Clipboard API #4998
Comments
same problem |
Currently, we are having an issue when pasting bullet and number lists in Safari. Do you think it's related to this? |
What type of issue? |
When I paste plain text with line breaks in Safari, Slate does not honor the line breaks. End result is all one block of text. |
Safari has progressively made the old copy/paste API less usable, a strong to push to use the newer API (which requires user consent). We need to implement that in 2023 to solve a number of problems with copy/paste in Safari. |
@dylans Sounds good. If you or the team need any help, I'm happy to contribute in any way I can. |
The Clipboard API doesn't require prompting for permission when writing to the clipboard from an event handler, only when reading it outside of a paste event. However, it won't work for copying I don't think there are any APIs that allow us to copy |
Description
A recent Safari update seems to have blocked all of Slate's attempts to append our syntax tree to
application/x-slate-fragment
. Previously this worked but would exclude files.Sandbox/Steps
Any slate example shows an empty
application/x-slate-fragment
when pasting.Expectation
We can control what gets pasted. Currently we're falling back to HTML which isn't great for void elements that have behavior not contained in html.
Environment
Context
We probably need to switch to the newer clipboard api for Safari, though it's annoying in that it asks for user approval. See various links in #4465 (comment)
The text was updated successfully, but these errors were encountered: