# Scroll down option in preview window

When writing a long post, if you want to check the output as you go along, you have to keep scrolling down and then back up to see the preview of the output. Which gets annoying after a post gets long enough. I imagine on Math or other sites where there is a lot of rendered output this is an even bigger annoyance.

Is it possible to give the preview box a standard size, which could be elongated at the bottom, and able to be scrolled, just like the box I'm typing in right now? That way, I could position my window so that the editing box and the preview box are both in full view at the position that I am currently working on.

• Maybe use the same height as the editing box. – Barmar Sep 16 '14 at 21:20

Provided the width of the preview is not reduced to accommodate a scroll bar (an inaccurate preview would be worse than an annoying one), I would very much like to see this improvement. There does not need to be a height to the preview - it can extend indefinitely downwards as it does now, allowing standard scrolling of the whole webpage which people currently like. All that needs to be introduced is a way of adjusting the top of the preview to match the part of the input box currently being edited.

If a straightforward and intuitive way of allowing this doesn't present itself, I would be happy to accept either a button that resets the top of the preview to reflect the edit position, or a tick box that when ticked causes the preview to move with the edit box.

People who don't use the button or tick box will have exactly the same experience as at present, with no new approach to get used to.

## An alternative

If it's simpler to implement/accept, there could be two previews displayed one below the other:

1. A box the same size as the edit box, that always scrolls automatically in step with the edit box position (no scroll bar required).
2. The standard full preview with no scroll bar, extending downwards as far as necessary to fit in the whole post.

(1) would be small and just show the part currently being edited, while (2) would allow browsing the full post prior to posting.

This alternative approach does not require introducing any scrollbars, so it would not cause problems with the fixed width of the core content. It would simply involve adding an extra type of preview between the edit box and the current preview, and even that could have a tick box to allow hiding it for people who don't find it useful/are attached to the old way.

How do you determine an adequate height before it should start scrolling though? Not every person has the same amount of room below the box they're typing into, and scrolling to see the bottom of a scrolled box would be even more annoying. Someone suggested before having the input box and the preview side-by-side, but that introduces its own problems as well.

You also have to consider other user's preferences. Personally, I like being able to scroll through the entire page with the preview, without a second scrollbar. In fact, I get a little irritated when pages include secondary scrollbars for standard content under the primary scrollbar for the page. You might have even seen people around here complain about the ones that exist on code blocks which grow too long in length.

Good news, this is pretty easy to do yourself with a very simple custom CSS snippet:

#wmd-preview { max-height: 400px; overflow: auto }


Just replace the 400px with however high you want it to be.

• Why do you need to determine a height? It could have an adjustable box just like the editing box does. – Y     e     z Sep 17 '14 at 3:06