open-index/open-npm huggingface dataset:
npm package: @marrock/editorjs-video-tool
Description: A simple plugin to upload videos in Editor.js with your own custom uploader.
Author: Seu Nome
Latest version: 1.0.4

# Editor.js Video Tool

A lightweight and customizable Video Tool for [Editor.js](https://editorjs.io). 
It allows you to upload and embed videos directly into your editor using a custom uploader (e.g., AWS S3, Cloudinary).

## Features
- ⚡ **Lightweight**: No heavy dependencies.
- 🛠 **Customizable**: Provide your own upload logic.
- 🎥 **Native Player**: Uses standard HTML5 `<video>` tag with controls.
- 🏗 **Type-safe**: Written in TypeScript with full type definitions.

## Installation

```bash
npm install @marrock/editorjs-video-tool
```

## Usage

Add the tool to the tools property of your Editor.js instance:

```ts
import VideoTool from '@marrock/editorjs-video-tool';

const editor = new EditorJS({
  tools: {
    video: {
      class: VideoTool,
      config: {
        uploader: {
          /**
           * Custom upload logic
           * @param {File} file 
           * @returns {Promise<{success: number, file: {url: string}}>}
           */
          async uploadByFile(file) {
            // Your S3/Server Action upload logic here
            const response = await myUploadService(file);
            
            return {
              success: 1,
              file: {
                url: response.url
              }
            };
          }
        }
      }
    }
  }
});
```

## Configuration

| Property | Type | Description |
| :--- | :--- | :--- |
| **uploader** | `object` | **(Required)** Object containing the `uploadByFile` function. |
| **toolbox** | `object` | Custom title and icon for the toolbox. |

## Data Output

```json
{
  "type": "video",
  "data": {
    "url": "https://your-video-url.com"
  }
}
```

## License

MIT