WordPress.org

Ready to get started?Download WordPress

Forums

Problems with the iframe tag and the WP editor (12 posts)

  1. William Bowles
    Member
    Posted 3 years ago #

    Some vidoes are now using the <iframe> tag instead of <object> or <embed> and when you edit the post in WP, the entire block disappears!

    If I keep it in source mode it seems to be ok, but if I switch back to wysiwyg mode, the code vanishes.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Don't switch between editing tabs. Pick a tab and stick to it.

  3. William Bowles
    Member
    Posted 3 years ago #

    That's ludicrous!

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Sorry but that's the reality of it. If you switch from the HTML to the Visual Editor whilst editing a post or page, you will lose some of your markup.

  5. William Bowles
    Member
    Posted 3 years ago #

    Mostly, it gets added, but why doesn't the editor like <iframe>? It's ridiculous. I've been switching back and forth ever since I started with WP and aside from the dreaded space tag and (a lot) of other niggly things, it generally leaves objects alone.

    If I altered the tag from iframe to object or perhaps embed, would it work? After all it's just a call to a location.

  6. MNL345
    Member
    Posted 3 years ago #

    This plugin solved my problem with the disappearing inline frame tags in WordPress 3.1 page editing window: TSL iframe unfilter.

    My research also turned up another possiblility but I did not try it as it looked more complicated for my enduser: PureHTML.

  7. William Bowles
    Member
    Posted 3 years ago #

    It actually seems to work!

    Thanks

  8. Don
    Member
    Posted 3 years ago #

    If you can't supply a legitimate answer to a legitimate question (esmi) than don't waste people's time.

    It's apparent MNL345 located the answer and supplied it, that's what forums are for and are supposed to do.

    Thanks for the correct answer MNL345, it's greatly appreciated.

  9. ClaytonJames
    Member
    Posted 3 years ago #

    Actually, I think esmi's assessment was not only spot on, but is a pretty well known issue and has been a frequent topic (visual -vs - HTML mode, and the possible negative effects of flipping between the two editors) of discussion here in the forums. Look it up yourself, if you care to. The fact that someone found a plugin to assist in providing an "ease of use" solution for the iframe issue, is simply a great example of WordPress's extensibility through plugins, and evidence of how specific some plugins can actually be in their nature - as well as of the fantastic work of plugin authors who contribute their time and expertise to share them with the WordPress community for free.

    That being said, although the plugin being referred to here happened to work as desired in this case, it was already questionable in it's compatibility with the OP's version of WordPress when it was mentioned several months ago. So... How's it working for you, still okay? If so, you might want to hop on over to the TSL iframe unfilter plugin compatibility box and cast your vote for "says it works" so others in the community will know the status for the current version of WordPress.

    Thanks!

  10. Don
    Member
    Posted 3 years ago #

    Clayton:

    To be specific esmi wrote:

    "Sorry but that's the reality of it. If you switch from the HTML to the Visual Editor whilst editing a post or page, you will lose some of your markup."

    The reality of it is just what I wrote. There is a solution and forums are for solutions not drivel. esmi offered no solution only stating the status quo is too bad their is no solution. He was flat out incorrect in his "solution" which was no solution when one did, in fact, exist.

  11. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    I agree with esmi (who happens to be a she, not a he) and ClaytonJames.

    In its default configuration, WordPress is intended to be used such that one chooses either the Visual editor or the HTML editor, but not both.

    There are solutions, to be true; but it is entirely relevant to point out that to implement such solutions involves modifying WordPress's default configuration, and as such requires sufficient knowledge and understanding of what one is doing. Thus, esmi's comment was appropriate.

    The easiest fix is to filter the $init configuration array that gets passed to TinyMCE (the Visual editor), so that IFRAME tags don't get filtered. I've posted this fix several times here in the forums.

    But, based on your admonishment of esmi regarding the proper use of forums, I assume you've already searched to find such previous answers, and already found them.

  12. Don
    Member
    Posted 3 years ago #

    I searched, I found, I conquered.

    The recommended filter plugin worked and continues to work fine with the latest version of WP.

    Also, I voted in the affirmative at the plugin site and highly recommended to correct the problems that occur with retaining the <iframe> code intact when switching between editor and html tabs in WP.

    It's all good! (TSL iframe unfilter plugin recommended initially in this thread by William Bowles)

    P.S. I might add, this problem only occurred for me in posts/pages not when using it within sidebars - i.e. adds from Amazon.com are <iframe>, and this has never been a problem using different themes and in some cases posts/pages prior to trying a new theme in the past week.

    Therefore, I would use the filter plugin to avoid problems when having multiple WP sites with different themes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags