2019-11-08 14:55:50 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<Markdown
|
|
|
|
v-model="val"
|
|
|
|
@on-ready="onReady"
|
|
|
|
@on-copy="onCopy"
|
|
|
|
@on-paste-image="onPasteImage"
|
|
|
|
@on-save="onSave"
|
|
|
|
:height="500"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-11 08:50:13 +08:00
|
|
|
// import Markdown from './dist/simple';
|
2019-11-08 17:57:24 +08:00
|
|
|
// import Markdown from 'vue-meditor';
|
2019-11-11 08:50:13 +08:00
|
|
|
import Markdown from './src/pro';
|
2019-12-13 17:32:17 +08:00
|
|
|
// import Markdown from './src/simple';
|
2019-11-08 14:55:50 +08:00
|
|
|
|
|
|
|
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>
|