Install mavon-editor (安装)
npm install mavon-editor --save
或者
cnpm install mavon-editor --save
如果提示:
deprecate mavon-editor@2.9.1 › highlight.js@^9.11.0 Support has ended for 9.x series. Upgrade to @latest
就请使用:
cnpm install mavon-editor@latest --save
Use (如何引入)
main.js
中进行导入
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// use
Vue.use(mavonEditor)
然后在需要编辑器的地方放入
<mavon-editor v-model="value"/>
就完成了初步的引入和使用,效果如下
设置高度
.markdown-body{
height: 800px;
}
具体的参数可以参考官方的介绍:
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后发表评论
注册
社交帐号登录