wangeditor-antd

A Vue 3 component wrapper for WangEditor
2,644
Install
npm install wangeditor-antd
Latest Version:1.1.1
Vue:3
License:MIT
Last Updated:Jun 13, 2025
Links: Gitee  ·  npm
Maintainer: top-dante

wangeditor-antd

基于vite+vue3.5x+typescript重新封装的WangeditorV5富文本编辑器

安装

npm install wangeditor-antd

或者

yarn add wangeditor-antd

使用

<template>
    <wang-editor v-model:value="html" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import WangEditor from 'wangeditor-antd'
import 'wangeditor-antd/dist/style.css'

const html = ref('')
</script>

功能

数据绑定使用vue3.5x的defineModel()

const props = defineProps({
  //  编辑器模式 默认为default,可选值:default | simple
  model:{type: String as  PropType<EditorModel>,default:'default'},
  //  是否显示边框
  bordered:{type: Boolean,default:true},
  //  内容区域高度
  height:{type: String,default:'300px'},
  //  上传服务器地址
  server:{type: String,default:''},
  //  上传文件字段名
  fileName:{type: String,default:'file'},
  //  上传文件大小限制,默认2M
  fileSize:{type: Number,default:1024 * 1024 * 5},
  //  上传文件数量限制,默认5
  fileMax:{type: Number,default:5},
  //  placeholder
  placeholder:{type: String,default:'请输入内容...'},
  //  token
  token:{type: String,default:''},
  //  背景颜色 默认#fafafa
  bgColor:{type: String,default:'#fafafa'},
  //  边框颜色 默认#d9d9d9
  borderColor:{type: String,default:'#d9d9d9'},
})

Related Packages

lexical-vue

An extensible Vue 3 web text-editor based on Lexical.

166,694 362
@juit/vue-tiny-editor

Juit Tiny Editor (for mentions!)

8,299 2
@matrajs/vue

Vue 3 bindings for Matra — useEditor, useEditorState, useEditorFocus and EditorC...

3,724 0
vue-wangeditor-simple

A vue plugin base on wangeditor 3.0

2,189 27
@mteditor/vue3

MtEditor 的 Vue 3 适配层:只做挂载、props 映射与事件透传的薄壳

996

Version History

Version Released Vue License
1.1.1 ^3.0.0 MIT
1.1.0 ^3.0.0 MIT
1.0.8 MIT
1.0.7 MIT
1.0.6 MIT