WordPress.org

Ready to get started?Download WordPress

Forums

Some people liked the iframe preview (24 posts)

  1. jayp
    Member
    Posted 7 years ago #

    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.

  2. Rongo
    Member
    Posted 7 years ago #

    Jayp, I started a thread about this very same topic after upgrading.
    http://wordpress.org/support/topic/117841?replies=5

    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

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

    include('edit-form-advanced.php');
    
    break;

    Insert:
    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>
    </div>
    <?php
  3. cylons
    Member
    Posted 7 years ago #

    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 :)

  4. aljuk
    Member
    Posted 7 years ago #

    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.

  5. moshu
    Member
    Posted 7 years ago #

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

  6. aljuk
    Member
    Posted 7 years ago #

    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.

  7. Rongo
    Member
    Posted 7 years ago #

    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.

  8. JohnP
    Member
    Posted 7 years ago #

    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?

  9. Chris_K
    Member
    Posted 7 years ago #

    JohnP - When viewing post editor, it is below the Title, to the right side. "View »"

  10. JohnP
    Member
    Posted 7 years ago #

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

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

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

  11. whooami
    Member
    Posted 7 years ago #

    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.

  12. JohnP
    Member
    Posted 7 years ago #

    duh!

    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...

  13. cylons
    Member
    Posted 7 years ago #

    Rongo,

    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.

  14. Chris_K
    Member
    Posted 7 years ago #

    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.

  15. ccf
    Member
    Posted 7 years ago #

    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.

  16. kansir
    Member
    Posted 7 years ago #

    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.

  17. shacker
    Member
    Posted 7 years ago #

    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.

    whooami, that's not true - there is no requirement to publish a post before previewing it at all. It works just fine in draft mode.

    The one problem I'm having is that the Preview button seems to "float" all over the place in Firefox/Mac. One minute it's where it should be, the next it's sitting on top of the categories list, etc. Anyone else seeing this?

  18. rueger
    Member
    Posted 7 years ago #

    Count me among those who were really irritated to find the inline Preview removed. I too do not like bouncing back and forth between tabs and find the current scheme annoying.

    Really some consultation beforehand would have been appreciated.

    The first rule for a developer should be to remember that real non-developer people use the products, and that the change that seems perfect might just make the product less usable.

  19. tamar
    Member
    Posted 7 years ago #

    I, too, would have liked an option to keep the inline Preview intact.

  20. emmadw
    Member
    Posted 7 years ago #

    I'll just add my vote for having the option to have the inline preview ... I can see that sometimes a new tab would be useful, but there are other times the inline one is more handy.

  21. thebadastronomer
    Member
    Posted 7 years ago #

    Nice, Rongo. Thanks for that; I added it myself. I doubt having the "preview" button is faster, since to preview you have to open new tab/window and open it. It's only faster if you are saving multiple times and you don't need to preview the post.

  22. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    No, it's a lot faster because the inline preview required an annoying delay while it rendered the actual page. Every single time, even if you didn't scroll down to look at the preview. The view link lets you get a preview when you actually want to see it instead of just getting it by default on the edit form.

  23. mattieb
    Member
    Posted 6 years ago #

    Maybe I'm dense, but what functionality is this adding? If I wanted to preview the post in a separate window (tab), I could scroll down to the inline preview, right click on the post title, select the menu option "Open in new tab"... and then the post would magically appear, in its own tab. That's: a scroll, and two mouse clicks (or a scroll, and a wave of the mouse, since I'm using Opera).

    But, I would still have the option of looking at the preview inline, if I wanted to... Before I had both pieces of functionality built-in, automatically, by the browser (this is surely built into any browser which also allows you to open multiple windows/tabs). Now I have only one option. Which has been made fractionally easier by adding its own special button.

    Admittedly, this new system opens a preview with an extra &preview=true appended to the end of the URL... Which does... what? Is it dependent on the theme I'm using?

    No, it's a lot faster because the inline preview required an annoying delay while it rendered the actual page.

    It renders the iframe separately, doesn't it? Or is that only on Opera... Maybe I just have super fast connections. Does the iframe hold up rendering of the entire post page?

  24. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Admittedly, this new system opens a preview with an extra &preview=true appended to the end of the URL... Which does... what? Is it dependent on the theme I'm using?

    Some themes and plugins will recognize the preview variable and not render some bits of relatively useless code, like adsense code, for instance. The iframe itself should have rendered with that variable already, that's not entirely new.

    Does the iframe hold up rendering of the entire post page?

    Not always, but it can do that, yes. Especially if your site itself has bits that hit third party sites which are slow to respond. There's a lot of factors at play here.

    It can also interfere with the execution of the javascript and other behind the scenes things on the write post pages, because until it renders, javascript might not execute, or at least, might not execute properly.

Topic Closed

This topic has been closed to new replies.

About this Topic