NewbieEditor

富文本编辑器 基于 WangEditor

Version: 1.0.0

Seeopen in new window

Props

Prop nameDescriptionTypeValuesDefault
v-model输入框的值
@model true
string-""
placeholder占位符string-"请输入内容..."
disabled是否禁用boolean-false
readonly是否只读boolean-false
config
@params .toolbarConfig 工具栏配置open in new window
@params .editorConfig 编辑器配置open in new window
object-{
toolbarConfig: {},
editorConfig: {}
}

Events

Event namePropertiesDescription
update:value

方法

名称参数说明
setContent(content:string) => void设置编辑器内容

Provider

名称参数说明
uploadUrlstring编辑器中的图片,文件上传路径
<NewbieProvider :eidtor="{uploadeUrl: 'somewhere-that-can-upload-files'}" />

示例



<template>
	<Button type="primary" @click="getContent">获取内容</Button>
	<NewbieEditor v-model:value="content" placeholder="来吧,写吧" />
</template>

<script setup>
import { NewbieEditor } from "jobsys-newbie"
import { message, Button } from "ant-design-vue"
import { ref } from "vue"

const content = ref("")

const getContent = () => {
	message.success(content.value)
}
</script>
Last Updated:
Contributors: sinceow