Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renanrider/editorjs-audio-player
https://github.com/renanrider/editorjs-audio-player
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/renanrider/editorjs-audio-player
- Owner: renanrider
- Created: 2023-11-15T16:58:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-16T16:18:00.000Z (about 1 year ago)
- Last Synced: 2024-10-03T21:18:18.455Z (2 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-editorjs - renanrider/editorjs-audio-player - Simple Audio Tool, works only with pasted URLs with audio src and requires no server-side uploader. (Tools / Block Tools)
README
![](https://badgen.net/badge/Editor.js/v2.0/blue)
# Simple Audio Tool
Provides Audio Block for the [Editor.js](https://editorjs.io).
![](https://res.cloudinary.com/renanrider/image/upload/v1700151279/npm%20files/demo.gif)
Works only with pasted URLs with audio src and requires no server-side uploader.
![](assets/image-uploading.gif)
## Installation
Get the package
```shell
npm i editorjs-audio-player --save
```Include module at your application
```javascript
import AudioPlayer from 'editorjs-audio-player';
```Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/editorjs-audio-player)
## Usage
Add a new Tool to the `tools` property of the Editor.js initial config.
```javascript
var editor = EditorJS({
...tools: {
...
audioPlayer: AudioPlayer,,
}...
});
```## Config Params
This Tool has no config params
## Output data
| Field | Type | Description |
| -------------- | --------- | ------------------------------- |
| src | `string` | src's url |```json
{
"type": "audioPlayer",
"data": {
"src": "https://file-examples.com/wp-content/storage/2017/11/file_example_MP3_700KB.mp3"
}
}
```