9
$\begingroup$

Dynamically-updated previews are wonderful. But because the preview appears below the post, I can only see the top of it. If I'm adding to the bottom of a long post, the browser is working and working to update the preview, but I can't actually see the relevant part of the preview, because it is off the bottom of the screen!

Possible solutions would include scroll bars on the preview area, preview side-by-side with editing area instead of underneath it, or some sort of windowing effect where the preview area would show only the part of the preview around the part of the post that was most recently edited.

Here is a screenshot showing the typical situation on my (1680×1050 pixel) laptop display when editing this answer:

enter image description here (View image full-size)

As you can see, only the top of the preview window is visible.

$\endgroup$
5
  • $\begingroup$ Some context is missing. Are you using a screen so small (smartphone?) that it cannot vertically fit the height of the full preview and a few lines of the editor? Or, perhaps, are you wishing that the previewer forces scrolling? $\endgroup$ May 13, 2012 at 21:01
  • $\begingroup$ I am not using an unusually small screen, but I think the context is irrelevant. A sufficiently long post will exceed the size of any screen. I will post a typical screenshot. $\endgroup$
    – MJD
    May 13, 2012 at 23:10
  • $\begingroup$ The screenshot says it all. I too have encountered that in long answers, but only rarely since my primary display is large (2560x1600). I agree it is a nontrivial problem. $\endgroup$ May 13, 2012 at 23:20
  • $\begingroup$ Here's the feature request on meta.SE to enable side-by-side Mardkwown preview. $\endgroup$ Apr 9, 2015 at 22:09
  • $\begingroup$ Your browser may allow two separate windows showing the same web page. Maybe this is what you want. $\endgroup$
    – GEdgar
    Apr 10, 2015 at 13:56

4 Answers 4

4
$\begingroup$

There is an old feature request Preview on the right please, optionally? which was never implemented by SE. The top answer there offered jQuery code which hides the right sidebar and moves the preview in its place. Because of some tweaks in SE page markup it no longer works, but here is an updated version as a bookmarklet. I tested it in Chrome and Firefox under Windows 7. Requirements:

  • horizontal display resolution of at least 1400
  • user must be logged in to SE (the code seems to be incompatible with SE interface for anonymous users)

Let me know if it fails to work for you. For completeness, the code is below.

javascript:(function(){
 $("#sidebar").hide();
 $("#content").width(1360);
 $("#post-editor").removeClass("post-editor");  
 $("#post-editor").width(1360);  
 $(".community-option").css("float","left");  
 $(".wmd-container").css("float","left");  
 $("#wmd-preview").css({"clear":"none","margin-left":"20px","float":"left"});  
})()
$\endgroup$
10
  • $\begingroup$ Thanks. The JS function looks plausible, but isn't working for me; I tried tinkering with it with no success. Does it work for you? $\endgroup$
    – MJD
    Jun 5, 2013 at 15:01
  • $\begingroup$ @MJD At the time it didn't, but after my edits, it does. $\endgroup$ Jun 6, 2013 at 7:15
  • $\begingroup$ @MJD: Are there any other recourses available now? $\endgroup$
    – user53259
    Mar 6, 2014 at 8:01
  • $\begingroup$ Doesn't work. Just tried it on gis.stackexchange.com/posts/141770/edit. The width does increase, but the preview is still under the edit area. $\endgroup$ Apr 9, 2015 at 21:51
  • 1
    $\begingroup$ @DanDascalescu Indeed, seems broken. Something may have changed in the markup of SE pages since 2013. $\endgroup$
    – user147263
    Apr 9, 2015 at 22:03
  • $\begingroup$ @pizza: I've posted a feature request on meta.SE to enable side-by-side Mardkwown preview. $\endgroup$ Apr 9, 2015 at 22:05
  • 1
    $\begingroup$ A few tweaks of this gets it working again on answer boxes: gist.github.com/shu8/3f854c2e0bcb5468b5ac $\endgroup$ Jul 12, 2015 at 20:00
  • $\begingroup$ @ᔕᖺᘎᕊ Thanks for fixing it (the user formerly known as ˈjuː.zɚ79365 :) $\endgroup$
    – user147263
    Jul 12, 2015 at 20:36
  • 1
    $\begingroup$ @1999 wait what?? The owner of this answer is you!? $\endgroup$ Jul 12, 2015 at 20:38
  • $\begingroup$ For more info, ᔕᖺᘎᕊ's script has a post about it on StackApps. $\endgroup$ Oct 20, 2015 at 16:23
3
$\begingroup$

I've run into the same problem while posting answers with tall screenshots.

I think there is a relatively easy solution available: adopt the same side-by-side fluid preview layout that Discourse uses. Discourse is forum software created by Jeff Atwood and others after he left StackOverflow.

Here's the feature request posted on meta.SE to enable side-by-side Mardkwown preview.

$\endgroup$
1
  • 1
    $\begingroup$ This version of ˈjuː.zɚ79365's script I made seems to work on answer boxes... $\endgroup$ Jul 12, 2015 at 20:04
0
$\begingroup$

Are there any other recourses available to this question? I tried user79365's bookmarklet using Windows 7 and Firefox 27.0. The result is the following. There is a preview on the RHS, but the input box ceases to function. To wit, after I click on the bookmarklet for that same window, I can't type anything in the input box.

enter image description here

$\endgroup$
5
  • $\begingroup$ The bookmarklet works for me in Chrome (Windows7). Here is a screenshot; I even posted this answer, which was written for testing purpose. :) What browser are you using? $\endgroup$
    – user127096
    Mar 6, 2014 at 18:46
  • $\begingroup$ Oh, I guess that's Firefox. I tested in Firefox 27, also Win7. Works. $\endgroup$
    – user127096
    Mar 6, 2014 at 18:52
  • $\begingroup$ @ 127.0.9.6: Thanks for your response. I've retested it but the input box still registers nothing? $\endgroup$
    – user53259
    Mar 10, 2014 at 7:01
  • $\begingroup$ Looks like we need official support for side-by-side previews. I'm posted the feature request on meta.SE to enable side-by-side Mardkwown preview. $\endgroup$ Apr 9, 2015 at 22:08
  • $\begingroup$ @DanDascalescu Thanks for the info. I upvoted your feature request there! $\endgroup$
    – user53259
    Apr 10, 2015 at 4:07
-1
$\begingroup$

Addendum: This doesn't work; I am leaving it here for reference.

Why not: Tile Tabs can't tile a tab with itself. What it does it open a new tab to the same URL, and tile the old and new tabs together. But then editing in one tab doesn't affect the preview in the other tab.


I have finally found a good solution to this problem.

Firefox has an add-on called Tile Tabs. It lets you split the browser's viewport in half, horizontally or vertically, and place one of its tab views in each half. You can tile the contents of two different tabs into one window, which is useful if you are copying information from one tab to the other. And you can tile the same tab into the two halves of a window, with different views in each:

screenshot of FireFox window with tiled tabs

Here the edit area is in the left viewport, and the display area is in the right viewport. There is plenty of room in both. The screenshot is of a browser window that does not even take up the full width of my laptop screen.

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .