1. ll-editor
自己扩充ckEditor5插件,视频上传,和pdf上传
ll-editor
Package: ll-editor
Created by: lvshaoli
Last modified: Sun, 08 May 2022 06:14:26 GMT
Version: 1.0.5
License: ISC
Downloads: 13
Repository: https://github.com/lvshaoli/lleditor

Install

npm install ll-editor
yarn add ll-editor
自己扩充ckEditor5插件,视频上传,和pdf上传

安装

npm install ll-editor/yarn add ll-editor

使用

<div id="editor" />

const myEditor = new MyEditor(
    {
        id: 'editor',
        ready: (editor) => {}, // 编辑器加载完毕
        disabled: false,  // 是否禁用
        editorConfig: {  // ckedior5相关配置
  language: "zh-cn",
        uploadVideo: ({ file, success }) => {
          console.log(file, success);
          setTimeout(() => {
            success &&
              success({
                src:
                  "http://xxx.xxx.xxx/image/v1/file/cache/download?key=video/test.mp4",
                name: "组件测试视频上传",
              });
          }, 5000);
        },
    }
);

获取编辑器内容
function _bind($editor) {
    const submitBtn = document.getElementById("submit");
    submitBtn.onclick = function () {
      const val = $editor.editor && $editor.editor.getData();
      console.log("editorGetValue", val);
    };
  };

  _bind(myEditor);

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin