Markdown Viewer

I'm not really fond of browser based text editors - especially the one used in here in devpinoy. I still write my posts using my favorite editor - gvim, and then paste them over to the blog software.

That is sufficient if you are only writing plain text all the time. What if you wanted to have code in your post and you want it to have syntax highlighting?

The only browser-based editor that I can tolerate is the one in StackOverflow and it uses Markdown.

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Markdown isn't really something new. If you open up a on old text document that you have, chances are, it's already using markdown. :-) What's cool with StackOverflow's editor is that has an markdown autopreview and you can mark a block as code and it will apply syntax highlighting magic using Google's prettify script.

So, what's should a programmer do? I can't just leave my favorite editor and then type all my posts in StackOverflow just so I could use the generated HTML? Nope - what I wanted is to still use gvim for editing (it even has a markdown mode) and then have another app that watches the file I'm editing and then transforms it into HTML everytime I save my changes.

That's what I have here. I'm typing the content using gvim...

Gvim Markdown

...and then I get to see the preview of what I am typing on my Markdown Preview application.

Markdown Preview

Then, all I need to do now is click on the Copy button and I paste the HTML over to the blog editor. The only missing piece is devpinoy - it does not yet support prettify! Keith!


This wouldn't be possible without Milan Negovan's Markdown.NET and Google's prettify. You can download a copy of the source code here if you find this useful.

Published 11-24-2008 8:30 AM by jop
Filed under:

Comments

# re: Markdown Viewer

let's put the pressure on Keith! ha ha :P joke

Thursday, November 27, 2008 1:54 AM by cruizer

# re: Markdown Viewer

Hahah! Pasensiya na. Been busy the past few weeks. I'm going to do it over this Thanksgiving weekend mga bossing. ;)

Thursday, November 27, 2008 10:26 AM by keithrull

# re: Markdown Viewer

hehe.. no pressure Keith. Happy Thanksgiving!

Thursday, November 27, 2008 4:06 PM by jop