1.4.9 • Published 5 years ago

simple-video-editorjs v1.4.9

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

npm.io

Simple Video Tool

Provides Video Blocks for the Editor.js.

Works only with pasted videos and URLs and requires no server-side uploader.

Installation

Install via NPM

Get the package

npm i --save-dev simple-video-editorjs

Include module at your application

const SimpleVideo = require('simple-video-editorjs');

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Load from CDN

You can load specific version of package from jsDelivr CDN.

https://cdn.jsdelivr.net/npm/@editorjs/simple-video-editorjs@latest

Then require this script on page with Editor.js.

<script src="..."></script>

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    video: SimpleVideo,
  }
  
  ...
});

Config Params

This Tool has no config params

Tool's settings

  1. Stretch to full-width
  2. Add default HTML controls for playback
  3. Enable autoplay and muted video.

Output data

FieldTypeDescription
urlstringvideo's url
captionstringvideo's caption
autoplaybooleanvideo will autoplay
mutedbooleanvideo will be muted by defaul
controlsbooleanvideo should display default controls
stretchedbooleanstretch video to screen's width
{
    "type" : "video",
    "data" : {
        "url" : "https://paul.kinlan.me/videos/2019-11-05--test-post-video-upload-0.mp4",
        "caption" : "An aweomse video",
        "autoplay" : false,
        "controls" : false,
        "muted": false,
        "stretched" : true
    }
}
1.4.9

5 years ago

1.4.8

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago