remarkable-youtube
v1.2.2
Published
Renders YouTube video links with iframe.
Downloads
8
Maintainers
Readme
remarkable-youtube
Remarkable plugin renders YouTube links as iframe.
Installation
npm:
npm install --save-dev remarkable-youtube
yarn:
yarn add -D remarkable-youtube
Usage
const Remarkable = require('remarkable');
const youtube = require('remarkable-youtube');
const md = new Remarkable();
md
.use(youtube, {
className: 'youtube-iframe'
});
In markdown files write link like:
[Video](youtube:YOUR_VIDEO_ID)
Options
className {String}
Additional class name to add on iframe element.
origin {String}
Specify web-site origin parameter.
related {Boolean}
Specify if YouTube player should show related videos at the end of a playback.
attr {String}
Specify the attribute name to use for source. Default value src
. Could be used to make videos lazy loaded, for example.