Opened 14 years ago
Closed 13 years ago
#16526 closed defect (bug) (worksforme)
Switching from "HTML" to "Visual" view when creating/adding a post deletes some of the code
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.5 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
Trying to use Vimeo's embed code in a post. When I add the code in the "HTML" view of a post and hit "Preview", the code works with no problem. But if I switch to "Visual" view (to write the rest of the post, the iframe part of the code gets removed, and so the video no longer appears in the post. Here's the Vimeo embed code:
<iframe src="http://player.vimeo.com/video/19723907" width="540" height="304" frameborder="0"></iframe><p><a href="http://vimeo.com/19723907">Moullinex - Catalina</a> from <a href="http://vimeo.com/moullinex">Moullinex</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
And after switching from "HTML" to "Visual" and then back to "HTML":
<a href="http://vimeo.com/19723907">Moullinex - Catalina</a> from <a href="http://vimeo.com/moullinex">Moullinex</a> on <a href="http://vimeo.com">Vimeo</a>.
Attachments (1)
Change History (11)
#2
@
14 years ago
I can reproduce as administrator user, so seems like something else going on for iframes.
Sidenote you can use the inbuilt oEmbed functionality to embed videos from vimeo (and other providers).
#3
in reply to:
↑ 1
@
14 years ago
Replying to nacin:
Do you have the unfiltered HTML capability? (Editor or administrator, or if multisite, super admin.)
I don't think it's a matter of unfiltered HTML. Iframes have been working just like farinha reports since I use WordPress (around 2.5). I haven't even thought it is a bug. :)
#4
@
14 years ago
See: Google Maps iframe Deleted with TinyMCE and Advanced TinyMCE
The patch I attached addresses this. But I'm not sure whether this is plugin material? tiny_mce_before_init
is made for this.
#7
follow-up:
↓ 8
@
14 years ago
- Version changed from 3.0.5 to 3.1
I am trying to paste the iFrame into a page and having the same issue in wordpress 3.1.
According to this: http://en.support.wordpress.com/google-maps/, it's supposed to turn the iframe into shortcode after you publish, draft, or update but it's obviously not working in wordpress 3.1. That's odd because that post is from March 3rd so it should work, right? Well, it's not working for me, unfortunately.
#8
in reply to:
↑ 7
@
14 years ago
Replying to theBrettman:
I am trying to paste the iFrame into a page and having the same issue in wordpress 3.1.
theBrettman, please don't change the version number. It's there to track when a bug was introduced / reported.
Also, could you try 16526.diff to see if it works for you? It needs some testing.
Side note: we need to disable this Version dropdown for non-committers.
#9
@
14 years ago
- Keywords reporter-feedback added; has-patch needs-testing removed
- Version changed from 3.1 to 3.0.5
The visual editor doesn't support iframes by default as they are very rarely used (this enhances security for most users too). If you want to use iframes, please make the patch into a plugin.
@theBrettman are you talking about wordpress.com or a self-hosted installation?
Do you have the unfiltered HTML capability? (Editor or administrator, or if multisite, super admin.)