0.0.3 • Published 6 months ago

editorjs-audio-player v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

npm.io

Simple Audio Tool

Provides Audio Block for the Editor.js.

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

npm.io

Installation

Get the package

npm i editorjs-audio-player --save

Include module at your application

import AudioPlayer from 'editorjs-audio-player';

Optionally, you can load this tool from CDN JsDelivr CDN

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    audioPlayer: AudioPlayer,,
  }

  ...
});

Config Params

This Tool has no config params

Output data

FieldTypeDescription
srcstringsrc's url
{
  "type": "audioPlayer",
  "data": {
  "src": "https://file-examples.com/wp-content/storage/2017/11/file_example_MP3_700KB.mp3"
  }
}