Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.28 KB

README.md

File metadata and controls

66 lines (42 loc) · 1.28 KB

Simple Audio Tool

Provides Audio Block for the Editor.js.

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

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

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