# editorjs-youtube-tool

> Youtube block for Editor.js

Latest version **0.0.5** (published 2021-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install editorjs-youtube-tool
pnpm add editorjs-youtube-tool
yarn add editorjs-youtube-tool
bun add editorjs-youtube-tool
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-09-11 |
| First published | 2021-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dimuska139 |
| Keywords | codex editor, editor.js, editorjs, youtube, embed, tool |

## Links

- npm: https://www.npmjs.com/package/editorjs-youtube-tool
- npm.io page: https://npm.io/package/editorjs-youtube-tool

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2021-09-11

## README

# YouTube tool

Provides Block Tool for embed YouTube videos for the [Editor.js](https://editorjs.io/).
This is just an example! Please use official [Embed Tool](https://github.com/editor-js/embed) instead.

## Installation

Install the package using NPM or Yarn

### Via NPM
```shell
npm i --save editorjs-youtube-tool
```

### Via Yarn
```shell
yarn add editorjs-youtube-tool
```

Import module at your application

```javascript
import EditorJSYoutubeTool from "editorjs-youtube-tool";
```

### Download to your project's source dir

1. Upload folder `dist` from repository
2. Add `dist/index.js` file to your page.

### Load from CDN

You can load EditorJSYoutubeTool from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/editorjs-youtube-tool):

`https://cdn.jsdelivr.net/npm/editorjs-youtube-tool`

Require this script on a page with Editor.js.

```html
<script src="https://cdn.jsdelivr.net/npm/editorjs-youtube-tool"></script>
```

## Usage

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

```javascript
const editor = EditorJS({
  ...
  
  tools: {
    ...
    youtube: EditorJSYoutubeTool,
  }
  
  ...
});
```

## Output data

YoutubeTool block returns code:

```json
{
    "type" : "youtube",
    "data" : {
        "id": "LOPHWxybSCA",
        "url": "https://www.youtube.com/watch?v=LOPHWxybSCA&t=2844s&ab_channel=AlexandrKupnyi",
        "embedUrl": "https://www.youtube.com/embed/LOPHWxybSCA"
    }
}
```

---
_Source: https://npm.io/package/editorjs-youtube-tool · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
