I need to allow you tube embedding. If I 'Dissable rich-text' I can embed you tube video's fine. However with rich text not disabled, just the text embedding code shows up.

I think its because the code is being changed from this:

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/P4wI_o8gyxA?rel=0" frameborder="0" allowfullscreen></iframe>

Into this:

<p>&lt;iframe title=&quot;YouTube video player&quot; width=&quot;480&quot; height=&quot;390&quot; src=&quot;http://www.youtube.com/embed/P4wI_o8gyxA?rel=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</p>

I think this must be wysiwug stopping it from working as it works with disabled rich text. I have none of the 'Cleanup and output' ticked and to 'Block formats:' in 'CSS' Ive added 'iframe'.

Thanks

Comments

brianV’s picture

Possible duplicate of #544032: Add iframes via TinyMCE?

jdln’s picture

Status: Active » Closed (duplicate)

Thanks, surprised theirs not a more standard solution though.

adrianmak’s picture

how about for ckeditor ?

drupalina’s picture

I use the "Media" button of the TinyMCE and embed Flash and for URL I just paste the URL of the youtube video. A bit un-intuitive and quircky solution... but it works just fine. Note: After the node has been updated, the video won't appear at first. Don't panic - just press F5 to reload that page.

webservant316’s picture

I tried the solution in #4, but I get whitespace. Here is the html generated from TinyMCE with flash and a URL to a a youtube video. What I am doing wrong?

<object width="320" height="240" class="mceItemMedia mceItemFlash" data="http://youtu.be/0iBg88C4MNc" type="application/x-shockwave-flash"><param name="url" value="http://youtu.be/0iBg88C4MNc" /><param name="src" value="http://youtu.be/0iBg88C4MNc" /><param name="play" value="false" /><param name="loop" value="false" /></object>