0

How to add iframe tag in CMS page in Magento 2.2

<iframe src="https://google.com" frameborder="0" width="500" height="900"></iframe>

1 Answer 1

1

On the CMS page in the admin, click the Show/Hide Editor button and paste the HTML there. The standard WYSIWYG will not render HTML.

First embed the required URL (embed.ly works). Then, copy paste into the CMS page Html render using WYSIWYG. Or, use the show/hide editor option and paste the HTML.

8
  • getting error "www.google.com refused to connect." on frontend
    – Mahendra
    Commented Apr 25, 2019 at 14:59
  • <html> <body> <iframe src="google.com"> <p>Your browser does not support iframes.</p> </iframe> </body> </html>
    – Mahendra
    Commented Apr 25, 2019 at 15:00
  • Added the html tag in using "html" render in WYSIWYG
    – Mahendra
    Commented Apr 25, 2019 at 15:01
  • I get the same error in an html file outside of Magento when using the iframe code in your post. This isn't a Magento issue. Are you just trying to get an iframe to work in general and are using google as an example?
    – mlunt
    Commented Apr 25, 2019 at 15:03
  • google.com using as an example
    – Mahendra
    Commented Apr 25, 2019 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.