MarkdownEditor inspired by https://github.com/jbt/markdown-editor