vue2-lay-editor

2.9.6 • Public • Published

vue2-lay-editor

  • 为写博客文章而生,结构化编辑器
  • 无需设计思想,无需考虑排版,轻松编写精美文章

安装

   npm install vue2-lay-editor

使用

import layEditor from "vue2-lay-editor";

配置 使用

   <lay-editor :value="value" :options="options"></lay-editor>

   data(){
      return {
         value:[],
         options:{
            // 主题色
            themeColor:"#1e80ff",
            // 对话配置
            dialogue = [
               {
                  leftImg: 'http://xxx/img.png',
                  leftText: "你好呀,我是小灰",
                  rightImg: 'http://xxx/img.png',
                  rightText: "我是大黄",
               }
            ],
            // 大图表情包配置
            maxEmoticon:[
                {
                     src: 'http://xxx/img.png'
                },
            ],
            // 小图表情包
            maxEmoticon:[
                {
                  title: '表情包1',
                  list: [
                     {
                        src:'http://xxx/img.png',
                     }
                  ],
               },
               {
                  title: '表情包2',
                  list: [
                     {
                        src:'http://xxx/img.png',
                     }
                  ],
               },
            ],
            uploadImg(file, src){
               return new Promise((resolve,reject)=>{
                  // 发送上传图片请求
                  // src 为上传后的图片地址
                  resolve(src)
               })
            }
        }
      }
   }

日志

2023 年 12 月 14

  • 优化代码块高亮
  • 新增了一些代码高亮语言

2023 年 12 月 20

  • 优化了代码块体积

Package Sidebar

Install

npm i vue2-lay-editor

Weekly Downloads

12

Version

2.9.6

License

MIT

Unpacked Size

196 kB

Total Files

68

Last publish

Collaborators

  • songbai