rewrite for markdown editor to vue.js