stephenharris / WP-MarkDown

WP-MarkDown plug-in. Allows Markdown to be enabled in posts, comments and bbPress forums.
http://wordpress.org/extend/plugins/wp-markdown/
112 stars 19 forks source link

Preview in tab #5

Open yumyo opened 12 years ago

yumyo commented 12 years ago

It is possibile to move the preview (rendered markdown) into a tab like the default editor does?

stephenh1988 commented 11 years ago

Potentially yes... it would require some custom javascript to hide the preview area and toggling the display of the text area and preview. There could be a performance improvement here of only updating the preview tab when its being viewed (some people have reported that the preview is a bit sluggish at times).

stephenh1988 commented 11 years ago

I've finally got some time to revisit this.

I think I'll make the preview in a tab by default - since this puts less strain on the browser (preview updates when you click preview, not as you're typing). Also, the benefits of a tab-less preview (namely you can quickly see what you're output will look like) is offset by the fact that if you write a sufficient amount, you have to scroll to the preview anyway.

Would be great to get feedback on preference though :) (If there's demand I might add as an option tab-less preview).

pedrolamas commented 11 years ago

Not quite fond with the tab solution, I personally like it on the bottom as it is... but that is just me! :)

frankielc commented 11 years ago

Agree with PedroLamas, I'd rather have it as is.

dantewang commented 11 years ago

I prefer the current one cuz' it's the way Stackoverflow works.

However, a option to choose the preview layout can also be a choice.

Anyway, please keep the current layout for Stackoverflow lovers! Thank you!

einkoro commented 10 years ago

@stephenharris Have you considered using any other editors than pagedown? I've been looking into adding a preview tab (or side by side panes) and making the buttons in the editor customizable. I haven't seen too many that offered all of GFM, Markdown Extra, customizable buttons and were still relatively lightweight but this one seemed to fit the bill the best outside of not having markdown extra out of the box. http://lab.lepture.com/editor/ https://github.com/lepture/editor

Looks like its based on marked which supports GFM but not Markdown Extra unfortunately.