Support » Fixing WordPress » <iframe> disappears between HTML and Visual editor

  • I’ve seen this bug mentioned elsewhere online, but the closest reference I found in the bug trac makes it unclear to me if it is planned to be fixed.

    When writing a post or page and I want to insert something like an Amazon link or Google Calendar with an <iframe> I switch to HTML view to paste in the code. After pasting in the <iframe> if I switch back to Visual view, the <iframe> will often disappear without notice. This also happens with existing posts containing iframes if I’m in Visual mode when I click to edit it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Don;’t switch between tabs when editing posts. If you edited a given post in the HTML tab, stick to that tab for all edits on that post in future.

    Has this been fixed? I’m having the same problem and always editing in HTML is not going to be an option as the individual editing the pages does NOT know HTML.

    This is really obnoxious. At least make it configurable. Why should I have to pay the price for someone else’s poor security decision?

    It is pretty silly, indeed.


    Here’s a workaround I tried successfully using WP 2.9.2 in Firefox 3.6:

    1. Write the post in whichever view you desire. (don’t switch as yet)
    2. Save (Save Draft / Update)
    3. Preview
    4. Edit
    5. Go from HTML to Visual if you need to, then go back. (Or if you were in Visual, go to HTML)

    If the html code disappears when you go from Visual to HTML view, do the following (and NOTHING ELSE until you’ve done this):

    1. Click your browser’s BACK button. (should go back to PAGE PREVIEW)
    2. Click on EDIT post

    This should open it in HTML, with all the code still there.

    esmi’s advice saved me from endless frustration when html code would disappear.

    There are two “View post” buttons on the edit page. One is in blue on the upper left of page; one is in black between “Edit” and “Get shortlink”. When I clicked the latter (which opened a new tab), the newly inserted html code would disappear. Clicking the former (the blue “View post”) kept the page on the same tab, and the html code was not lost.

    The black “View post” should either be repaired or removed.

    Thanks, esmi.



    I found a great fix for the Vimeo iframe issue without the need of plug-ins:


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘<iframe> disappears between HTML and Visual editor’ is closed to new replies.