本页导航
article
wangEditor
AI摘要
本文介绍了wangEditor,这是一款基于Vue框架的在线Markdown编辑器。它支持多种配置参数如编辑模式、只读状态和工具栏定制,并且允许自定义文件和视频上传接口。通过事件机制实现内容的双向绑定,方便开发者集成和使用。整体设计简洁且功能实用,适合需要在线编辑Markdown内容的项目。
说明
在线Marndown编辑器
使用
<script setup lang="ts">
import { WangEditor } from "liyao-vue-common"
</script>
<template>
<WangEditor />
</template>
可选参数
// 定义 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官方文档
最后更新于 2025-09-30 20:31