can be interesting, but not easy. checkout https://github.com/joemccann/dillinger or http://benweet.github.io/stackedit/