20 Star 103 Fork 50

smallwei / avue-plugin-ueditor

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

avue 富文本编辑器

Avue官网

https://avuejs.com

介绍

三方编辑器wangEditor

  • 文档
  • 组件配置中customConfig属性为wangEditor编辑器的配置

使用

1.安装
vue2:npm install avue-plugin-ueditor --save
vue3:npm install avue-plugin-ueditor@next --save

2.导入
import AvueUeditor from 'avue-plugin-ueditor'
Vue.use(AvueUeditor);

3.Avue配置中使用
...
column:[
  ...
    {
      label:'test',
      prop:'test',
      component: "avueUeditor",
      //wangEditor编辑的配置
      customConfig: {
        lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
      },
      //是否启用oss(qiniu/ali)
      oss:'',
      headers:{},
      data:{},
      propsHttp: {
        home:'',
        url:'',
        res: ''
      },
      //普通图片上传
      action: "",
      //七牛云oss配置
      qiniu: {
        AK: "",
        SK: "",
        scope: "",
        url: "",
        deadline: 1
      },
      //阿里云oss配置
      ali: {
        region: "",
        endpoint: "",
        accessKeyId: "",
        accessKeySecret: "",
        bucket: ""
      }
    }
  ...
]
4.组件中使用
<avue-ueditor v-model="text" v-bind="options"></avue-ueditor>

options: {
  //wangEditor编辑的配置
  customConfig: {
    lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
  },
  propsHttp: {
    home:'',
    url:'',
    res: ''
  },
  //是否启用oss(qiniu/ali)
  oss:'',
  headers:{},
  data:{},
  //普通图片上传
  action: "",
  //七牛云oss配置
  qiniu: {
    AK: "",
    SK: "",
    scope: "",
    url: "",
    deadline: 1
  },
  //阿里云oss配置
  ali: {
    region: "",
    endpoint: "",
    accessKeyId: "",
    accessKeySecret: "",
    bucket: ""
  }
}
...

upload Attributes

参数 说明 类型 可选值 默认值
action 图片上传地址 String -
headers 上传附带请求头数据 Object -
data 上传附带数据 Object -
props 相关可配置参数,具体参考props配置 Object -
oss 是否使用oss不写则为普通上传 String ali/qiniu -
qiniu 七牛云oss配置,具体参考qiniu配置 Object -
ali 阿里云oss配置,具体参考ali配置 Object -

propsHttp Attributes

参数 说明 类型 可选值 默认值
res 返回的数据结构层次 String -
url 返回结构体图片地址字段 String -
home 图片的根路径地址 String -

qiniu Attributes

参数 说明 类型 可选值 默认值
AK 七牛云的密钥 String -
SK 七牛云的密钥 String -
scope 七牛云存储的空间名 String -
url 空间的自定义域名 String -
deadline token的过期时间 String -

ali Attributes

参数 说明 类型 可选值 默认值
region oss所在区域的名称,具体查看阿里云oss文档 String -
endpoint oss所在区域的域名,具体查看阿里云oss文档 String -
accessKeyId 阿里云的密钥 String -
accessKeySecret 阿里云的密钥 String -
bucket 阿里云存储的空间名 String -
MIT License Copyright (c) 2020 smallwei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

avue 富文本编辑器 expand collapse
JavaScript and 3 more languages
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
JavaScript
1
https://gitee.com/smallweigit/avue-plugin-ueditor.git
git@gitee.com:smallweigit/avue-plugin-ueditor.git
smallweigit
avue-plugin-ueditor
avue-plugin-ueditor
master

Search