Appearance
wangEditor
说明
在线Marndown编辑器
使用
vue
<script setup lang="ts">
import { WangEditor } from "liyao-vue-common"
</script>
<template>
<WangEditor />
</template>
1
2
3
4
5
6
7
2
3
4
5
6
7
可选参数
typescript
// 定义 props
const props = defineProps({
modelValue: {
type: String,
default: '',
},
mode: {
type: String,
default: 'default',
},
readOnly: {
type: Boolean,
default: false,
},
toolbarConfig: {
type: Object,
default: () => ({
excludeKeys: ['fullScreen'],
}),
},
uploadFileApi: Function,
uploadVideoApi: Function,
})
// 定义 emits
const emit = defineEmits(['update:modelValue'])
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
更多配置请查看wangEditor官方文档