remarkable-youtube

1.2.2 • Public • Published

remarkable-youtube

npm version npm

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.

Package Sidebar

Install

npm i remarkable-youtube

Weekly Downloads

10

Version

1.2.2

License

MIT

Unpacked Size

4.54 kB

Total Files

5

Last publish

Collaborators

  • bobrov1989