-
Notifications
You must be signed in to change notification settings - Fork 13
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
Clipboard API in iFrame not allowed / execCommand deprecated though #23
Comments
Hello @lukas-a-brand! We have an internal feature request for this that we are reviewing. There is a workaround:
|
Hey @johannes-lindgren! May I ask what you are basing the lack of support on? The workaround you mentioned sadly does not satisfy at all for the usecase here as it copies the underlying settings object used in one plugin instance and lets it be imported into another component theme plugin instance to be imported. That is the whole sense on why the Clipboard API is existing I guess. (; Is there anything that still stands against allowing field type plugins to use the Clipboard API? |
Hey @lukas-a-brand, you're absolutely right, I see that it's available since Firefox 127 (released 2024-06-11): (Which makes me realize that we can do an improvement on the rich text editor for Firefox users) Thank you for explaining, I understand your use case better now.
Since it affects the permission policy, we're discussing it internally—let's see what comes out of it 🙂 |
Heyhey @johannes-lindgren. Awesome. I'm happy it led to some additional improvement possibilities as well. (; Hopefully, it works out - my Field Type Plugin has waited for almost a year now already to get some of the nice copy-paste + import functionality out of the door :D |
Hey, @johannes-lindgren |
In the past, it was possible to enable clipboard functionality like copy/paste in field type plugins.
As execCommand seems to be deprecated nowadays, while the navigator.clipboard API would be usable in modern solutions.
As Field Type Plugins run in iframes, this would require the encapsulating iframes to have allowed options set for them to work.
Expected Behavior
Iframes allow the read/write access to the Clipboard API.
So the following would work.
(Optimally also in the development Sandbox ofc)
Current Behavior
As the iframe settings encapsulating the field type plugin currently do not allow that, any read or write access to the Clipboard API is blocked.
References
The text was updated successfully, but these errors were encountered: