Markdown preview

Preview can be generated by page refresh which saves the document or by XHR when javascript enabled.