Closed OneX closed 1 year ago
There's currently no in-built way to remove iframe attributes, but that's something we can look at for a future release.
Just released Embedded Assets 3.0.5 - iframeCode
now accepts a removeAttributes
argument which is an array of the attributes you want to remove, e.g.:
assetField {
embeddedAsset {
iframeCode(removeAttributes: ["frameborder"])
}
}
@ttempleton great. Thanks for informing us.
Description
When Craft GraphQL return the iframeCode it includes the frameborder attribute. This is provoking the following w3 validation error:
Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
Is there a way to remove that attribute from iframe code?
Steps to reproduce
Other information