0.0.6 • Published 5 years ago

xws-editor-video v0.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

npm.io

Video Tool

Image Block for the Editor.js.

npm.io

Features

  • Uploading file from the device
  • Pasting copied content from the web
  • Pasting images by drag-n-drop
  • Pasting files and screenshots from Clipboard
  • Allows to add border, background
  • Allows to stretch image to the container's full-width

Note This Tool requires server-side implementation for file uploading. See backend response format for more details.

Installation

Install via NPM

Get the package

npm i --save-dev xws-editor-video

Include module at your application

import VideoTool from "xws-editor-video";

Other methods

Manual downloading and connecting

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.
import VideoTool from 'xws-editor-video';

// or if you inject ImageTool via standalone script
const VideoTool = window.VideoTool;

var editor = EditorJS({
  ...

  tools: {
    ...
    video: {
        class: VideoTool,
        config: {
          uploader: {
            uploadByFile(file) {
              return axiosInstance.post("/aa039/upload/video", {
                file: file, isFormData: true
              }).then(function (res) {
                return {
                  success: 1,
                  file: {
                    url: res.data.cos_data.data.source_url
                  }
                };
              });
            }
          }
        }
      }

  ...
});
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago