|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div contenteditable class="text" v-html="rawText"></div>
|
|
|
+ <div contenteditable class="text" v-html="rawText" @input="input"></div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import '@wangeditor/editor/dist/css/style.css'; // 引入 css
|
|
@@ -11,8 +11,13 @@ export default {
|
|
|
default: '',
|
|
|
},
|
|
|
},
|
|
|
- setup() {
|
|
|
+ setup() {},
|
|
|
+ methods: {
|
|
|
+ input(e){
|
|
|
+ this.$emit('update:rawText', e.target.innerHTML)
|
|
|
+ }
|
|
|
},
|
|
|
+ emits: ['update:rawText'],
|
|
|
};
|
|
|
</script>
|
|
|
|