hinesboy / mavonEditor

mavonEditor - A markdown editor based on Vue that supports a variety of personalized features
http://www.mavoneditor.com/
MIT License
6.42k stars 917 forks source link

[Question] 只有单个html怎么通过cdn 引入js? #666

Open lucasjinreal opened 3 years ago

lucasjinreal commented 3 years ago

如果只需要markdown的渲染功能,我的项目没有npm依赖,只有一个简单的html,怎么实现通过cdn来引入这个Js呢

ygj6 commented 3 years ago

当前还存在一点小问题,如果你不使用图片上传功能,你可以参考 https://github.com/hinesboy/mavonEditor/issues/586 的方式测试一下:

txperl commented 2 years ago

可以试一下这样子使用。

<!-- css -->
<link href="https://cdn.jsdelivr.net/npm/mavon-editor@2.9.1/dist/css/index.css" rel="stylesheet" />

<!-- js -->
<script src="https://cdn.jsdelivr.net/npm/mavon-editor@2.9.1/dist/mavon-editor.js"></script>
Vue.use(MavonEditor)

<!-- html -->
<mavon-editor v-model="value" />