2019-07-16markdown转html
2019-07-16 本文已影响0人
Kason晨
使用marked 这个插件
npm install marked --save
然后再需要的页面引入,
import marked from 'marked'

然后直接使用maeked()方法即可转换为html。
sendNews() {
alert(marked(this.content));
},

npm install marked --save
然后再需要的页面引入,
import marked from 'marked'
然后直接使用maeked()方法即可转换为html。
sendNews() {
alert(marked(this.content));
},