How do I embed a vimeo video into the body field. The iframe is being removed in my input format. How do I add it?
5 Answers
The input formats can be configured at /admin/settings/filters/list
so that you can add the <iframe>
tag as an allowed tag to the input format that you are using.
Though, I think for security purposes, you may want to allow tags other than <iframe>
. One option it so use Vimeo's 'old' embed code (the link would be just above the box where you copy the code from). The old embed code uses the <embed>
and <object>
tags, which you'll likely still have to add to the filter's allowed HTML tag list.
-
-
-
@Lucy The allowed HTML tags can be added at
/admin/settings/filters/list
which should look like this screenshot: indicia.googlecode.com/svn/wiki/drupal_input_formats.png. I assume you're usingFiltered HTML
so if you click on the configure link and see if you can find this screen: packtpub.com/sites/default/files/Article-Images/…. There you'll see the list of Allowed HTML Tags which you can add to.– nmcJun 21, 2011 at 13:09
Many possibilities:
- Change your input format to include
<iframe>
, it's inadmin/settings/filters/1/configure
for the "Filtered HTML" format - If you're the one posting and you're admin, you may use the "PHP" format, not very recommended (don't forget to enable the PHP filter module)
- As Laxman13 suggests, use Embedded Media Field but I would personnaly use the Media: Vimeo module and put the video in a CCK field which could be more usefull when you want to build a views with these videos.
Have you tried changing the input filter that is being used on the textarea?
You could also use Embedded Media Field module along with the sub-module Embedded Inline Media. However, all this seems to do is add another input filter to be used to automatically display an embedded video.
You need to refresh the browser page after you submit the node edit form.
Webkit browsers will not show embedded media directly after submit. This is a side effect of a security feature. http://code.google.com/p/chromium/issues/detail?id=98787