Support » Requests and Feedback » Some people liked the iframe preview

  • I love installing updates to learn for the first time that functionality has been stripped away, with no option to replace it.

    I’m speaking of WordPress 2.2 and that it now kills the iframe preview. No option to turn it back on…

    I’m sure eventually (days or months, perhaps never) a plugin could restore it’s functionality.

    All in all though, it’s getting frustrating in WordPress Land these days.

    It would be extremely nice to detail these changes before new releases are made public. I mean, with 17 developers and other enthusiasts adding content daily to Dashboard, you’d figure there would be an opportunity. Perhaps even the developer’s blog would have been a great place for it, no?

    If anybody knows a solution for turning the post preview back on, I’m all ears.

Viewing 15 replies - 1 through 15 (of 23 total)
  • Jayp, I started a thread about this very same topic after upgrading.

    I was extremely disappointed to find the inline preview was gone. It got old real fast having to keep switching browser windows to preview posts requiring multiple edits.

    At the absolute very least, users should have been given the option of using a second window or the inline preview.

    That said, I found where I could restore the inline functionality myself.

    File: /wp-admin/post.php

    On or about line 67, you will see the following two lines:


    Put the following in between those two lines:

    <div id='preview' class='wrap'>
    <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?></h2>
    <iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>

    i’m totally baffled as to why the same-page preview was taken away. does “some people liked the iframe preview” imply that other people didn’t? i mean, it was pretty inoffensive… i never even had to look at it if i didn’t scroll down past the main text box… however, i DID find it extremely useful to be able to hit ‘save and publish,’ and that’s it, nothing else, if i wanted to see how my post was looking so far. it wasn’t annoying like when you change your theme and you have to go back/forth or open a new tab if you want to see your changes. except now it’s *exactly* annoying like that and i really can’t fathom how such an innocuous feature was marked for death πŸ™

    thanks for the code, though – hopefully, i won’t break it during the cut/paste process πŸ™‚

    This must surely be a development oversight. I’d find it difficult to imagine that it would be purposefully removed – to do so would just me pointless and stupid. It’s the whole reason I chose WP over other systems. It makes no sense to not be able to see your post in the edit stage – otherwise how can you tell what it’s going to look like with images, css, flash etc? I can’t believe they would do it on purpose.

    It is there – just not in an iframe (that was slow) but opens a new window.

    Thanks for the reply Moshu. It is indeed better/faster. And now I am even more impressed with WP due to the speed of your moderation replies!

    And Rongo, your hack works perfectly, but I’ve removed it now and will use the Preview button. As Moshu says, it’s quicker.

    Quicker for some, but for me, I never encountered any slowness and this entirely avoids having to open a new window just to see my edits (I’m not a fan of extra windows or extra tabs, so the inline preview was perfect for me). For me, having to switch between windows is much more tedious and, quite frankly, unproductive.

    As for the topic of speed, I personally think that’s entirely debatable as to just how much it it actually saves. Consider that the inline preview loads the post in the same window, making it use at most, a little extra RAM. The “link preview”, on the other hand, requires an entirely new tab (FF) or an entirely new browser session (IE6 and below), thus using more PC’s resources — and each one still has to load the post. And then you have to switch between windows or tabs for the previews. Given all of that, I guess I fail to see any actual advantage in savings of speed, resources or even efficiency.

    That, of course, is just my personal opinion.

    Now, having said that, I still think it should be an option for users to enable/disable rather than being forced to “hack” a core file going forward just to re-enable it. This would please those like myself who prefer the inline preview, as well as those who prefer jumping between extra windows.

    I’m hopeful the developers will recognize there is a userbase for both and make it a simple option admins can enable/disable by choice.

    moshu wrote:

    It is there – just not in an iframe (that was slow) but opens a new window.

    I now have 3 WP2.2 instalations, and none of them has a “Preview” link above the content area. Does it have to be enabled somewhere?

    JohnP – When viewing post editor, it is below the Title, to the right side. “View »”

    Not on the version I’ve downloaded. The page source is:

    <fieldset id="titlediv">
    	<div><input type="text" name="post_title" size="30" tabindex="1" value="" id="title" /></div>
    <fieldset id="postdivrich">

    ie: nothing between the Title text-entry and the Post heading. Same in Firefox and IE7.

    you have to publish the post first. thats the trick, and essentially goes to the heart of why its not really a preview option, anymore.

    That link that they’re speaking of you takes you to the single post view of the page ..

    I haven’t checked, but it _might_ kick in after the auto-save (assuming thats still a *feature*), I don’t know, I haven’t looked long enough.

    I’m the first one to stand up and say that my main blog is NOT running 2.2 so I’m learning as I go as well.


    Thanks whooami.

    Now that I’ve finally found it, I think it actually is better than the I-frame, so I better exit this thread.

    It would make more sense to be beside the publish button though…


    THANK YOU FOR YOUR CODE! I have to say, I think that was the single best core file hack I’ve ever tried with wordpress – I mean, it’s usually these sketchy little phrases with deprecated wp tags, or the line number I’m supposed to edit turns out to be something totally different in my version of the file, or I apply the fix and suddenly my entire site is one neverending parse error…
    But not your beautiful workaround! It was perfect! The relevant line of code was exactly where you said it would be, and it was the exact same line, and my long-lost iframe came back to my loving arms immediately after adding the hack! And it didn’t turn my site into a brain damaged, drooling version of itself!
    Seriously, you were extremely helpful – Thank you.

    But anyway, do you really have to PUBLISH the post before you can even see the PREVIEW link? So if you want to save and continue editing, you don’t get a link to the preview? You can’t see how your post will look without making it live? Man, I’m really not getting how this makes the posting process more efficient. But, I suppose I have my wonder-hack now, so I probably should stop nitpicking.

    but anyway, do you really have to PUBLISH the post before you can even see the PREVIEW link?

    Hell no. That’d be dumb.

    But you do have to “SAVE” it or there ain’t anything to see, right? Just like the previous version, the iframe would be empty until your first save.

    Thanks, HandySolo. I came here like everyone else to find out about the preview feature. I couldn’t believe it had disappeared!
    The preview link is right there, where you said next to the title. I like that it opens in a new window and it IS much faster now than it used to be. Plus, as it opens in a new window you see your post as it will be and not only part of it.

    I like the inline preview function. It is very useful. Will WordPress put it back? or Let the user to choose if they need that inline preview.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Some people liked the iframe preview’ is closed to new replies.