Provides Audio Block for the Editor.js.
Works only with pasted URLs with audio src and requires no server-side uploader.
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
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
audioPlayer: AudioPlayer,,
}
...
});
This Tool has no config params
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"
}
}