# xws-editor-video

> Video Tool for Editor.js

Latest version **0.0.6** (published 2019-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install xws-editor-video
pnpm add xws-editor-video
yarn add xws-editor-video
bun add xws-editor-video
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-08-07 |
| First published | 2019-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 54.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CodeX |
| Maintainers | mingying |
| Keywords | codex editor, tool, Video, editor.js, editorjs |

## Links

- npm: https://www.npmjs.com/package/xws-editor-video
- npm.io page: https://npm.io/package/xws-editor-video

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2019-08-07
- 0.0.5 — 2019-08-05
- 0.0.4 — 2019-08-05
- 0.0.3 — 2019-08-05
- 0.0.2 — 2019-08-05
- 0.0.1 — 2019-08-05

## README

![](https://badgen.net/badge/Editor.js/v2.0/blue)

# Video Tool

Image Block for the [Editor.js](https://editorjs.io).

![](https://imgs-1253854453.image.myqcloud.com/4bf667fed3c7acfd2b06d85ee3cb66af.jpg)

## 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](#server-format) for more details.

## Installation

### Install via NPM

Get the package

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

Include module at your application

```javascript
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.

```javascript
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
                  }
                };
              });
            }
          }
        }
      }

  ...
});
```

---
_Source: https://npm.io/package/xws-editor-video · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
