An Editor.js plugin to embed YouTube Video.
Simply copy and paste YouTube video URL to embed.
Get the package
npm i editorjs-youtube-embed
Include module at your application
const YoutubeEmbed = require('editorjs-youtube-embed');
- Download folder
dist
from repository - Add
dist/main.js
file to your page.
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
youtubeEmbed: YoutubeEmbed,
}
...
});
This tool has no config params
Field | Type | Description |
---|---|---|
url | string |
video url |
{
"type": "youtubeEmbed",
"data": {
"url": "https://www.youtube.com/watch?v=L229QDxDakU"
}
}