Skip to content

vitaliy-bobrov/remarkable-youtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Renders YouTube video links with iframe

Resources

License

Stars

Watchers

Forks

Packages

No packages published