vue-markdown/App.vue

49 lines
1002 B
Vue
Raw Normal View History

<template>
<div>
<Markdown
v-model="val"
@on-ready="onReady"
@on-copy="onCopy"
@on-paste-image="onPasteImage"
@on-save="onSave"
:height="500"
/>
</div>
</template>
<script>
// import Markdown from './dist/simple';
2019-11-08 17:57:24 +08:00
// import Markdown from 'vue-meditor';
import Markdown from './src/pro';
2019-12-13 17:32:17 +08:00
// import Markdown from './src/simple';
export default {
components: {
Markdown
},
data: function () {
return {
val: ''
}
},
methods: {
onReady(data) {
console.log(data)
},
onCopy(text) {
console.log(text);
},
onPasteImage(file) {
console.log(file)
},
onSave(data) {
console.log(data);
}
}
}
</script>
<style lang="less">
</style>