Closed JanStevens closed 1 year ago
seems like a nice addition! go ahead, and thank you! ❤️
Hi @JanStevens ! We can definitely do that! One question, would you find useful to specify iframe parameters other than allow
? In this case, we can add a customizable FieldArray
called iframeOptions
, instead of just a Field for the allow
parameter. Let me know :)
Sounds great I'll adapt the PR!
But do you think it can be a good idea @JanStevens? What other attributes could be useful to send? 😕 I mean, other than allow
.
I don't have a use case for any other attribute right now but using the Field Array makes it more extensible in the future so it seems a more logical way to go.
Full list of possible attributes: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
@stefanoverna can we move on the PR https://github.com/datocms/plugins/pull/88 ? I honestly don't see any usage for any other attribute, it can always be added later if there is a valid use case for it
Released in v1.0.13 of the plugin!
Hi,
When using web previews we want to have a bit more control over the iframe that is used to render the preview in the sidebar. Specifically we want to allow some browser features (like
clipboard-write
).The easiest solution is to add configuration to specify the
allow
attribute in the plugin configuration (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy).Additionally we could also work with toggles or features to enable or disable. I can make a PR for both solutions, WDYT?
Regards