Skip to content

Editor 富文本编辑器

代码演示

基础用法

vue
<template>
    <x-editor></x-editor>
</template>

<script setup></script>

<style lang="less" scoped></style>

内联编辑器

vue
<template>
    <x-editor :option="option"></x-editor>
</template>

<script setup>
import { ref } from 'vue'

const option = ref({
    inline: true,
})
</script>

<style lang="less" scoped></style>

更多用法

提示

基于 TinyMCE 实现,更多使用方式请参考官方文档。https://www.tiny.cloud/docs/tinymce/6/basic-setup/

API

Props

名称说明类型默认值
model-value(v-model)内容string-
option配置object{}
heightnumber300
placeholder占位文本string-
disabled禁用booleanfalse

Events

事件名说明返回值
initialized初始化完成editor

本文档内容版权为 XYAdmin 作者所有,保留所有权利。