---
date: 2025-03-27 00:30:07
title: wangEditor
permalink: /pages/4f7aaa
tags:
  - vue组件
author:
  name: 华总
  link: https://xiaoying.org.cn
categories:
  - 使用指南
  - 基础组件

---





## 说明

在线Marndown编辑器

##  使用

```vue
 <script setup lang="ts">
   import { WangEditor } from "liyao-vue-common"
 </script>
 
 <template>
  <WangEditor />
 </template>
```



## 可选参数

```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'])

```

更多配置请查看[wangEditor官方文档](https://www.wangeditor.com/v5/toolbar-config.html)