Hello all,
I have a flash based publication that I want to include in a drupal site. I think the only way to do this is with iframe. It is basically a flash-based ebook with two different flash movies that play one after another on two separate html pages. Generally we try to avoid iframes but these are pages that I have created myself and they are related. It would be no minor task to integrate them into one flash movie and try to embed that into an article or page. So, I was looking for the iframe support for drupal 7 and did not see it. Is iframe supported with fields in core?


rj’s picture

Absolutely, there's a number of ways you could do it. The easiest (IMHO) is to create a text box and then include your iframe code in the text box. You'll need to make sure the input format of the text box is configured to allow all HTML, otherwise it will not display the iframe.

There's also the iframe module, which hasn't been ported to D7 yet.


Kirk’s picture

Alternately, you can just change the input filter to something like "Full HTML", and paste the iframe code into the node body.

brucewhealtonjr’s picture

This is a simple solution... too bad it didn't occur to me right away.

percyd’s picture

I just tried that with a text field set to full html, and all it shows is the link, not the content...

percyd’s picture

nevermind, it works!

hedel’s picture

for render iframes is important be sure that the text format selected (FULL HTML) was configurated for accept iframes here yoursite.com/admin/config/content/formats (Drupal 7)

Hédel Nuñez Bolívar

hwi2’s picture

For some reason, the full HTML was not working for me, so I created a simple module (without a hook) in it and it works:

function your-module-name_iframe()
	return '<iframe src="URL" width="100%" height="100%" frameborder="0"></iframe>';


This would work in any block with PHP code enabled or a template suggestion, but you could also use hook_block_view() and hook_block_info() to create blocks o the fly.


hnuguru’s picture

For Drupal7, iframe can work with Full HTML and PHP code with out even any iframe modules installed. There is also iframe filter available for Drupal 7 if full html and php doesn't work. (https://drupal.org/project/iframe_filter)

gisle’s picture

For anyone still looking for a solution to this, there now is a submodule of WYSIWYG filter that lets you allow iframes from a whitelisted list of domains It is Src whitelist.

- gisle