markdown-it-video-ext
v0.1.3
Published
Markdown-it plugin to embed a hosted videos youku youtube and vimeo
Downloads
25
Maintainers
Readme
markdown-it-video
markdown-it plugin for embedding hosted videos.
Usage
Enable plugin
var md = require('markdown-it')({
html: true,
linkify: true,
typography: true
}).use(require('markdown-it-video')); // <-- this use(package_name) is required
Example
This only works in the inline style.
@[youtube](dQw4w9WgXcQ)
is interpreted as
<p><iframe id="ytplayer" type="text/html" width="640" height="390"
src="http://www.youtube.com/embed/dQw4w9WgXcQ"
frameborder="0"/></p>
Alternately, you could use a number of different YouTube URL formats rather than just the video id.
@[youtube](http://www.youtube.com/embed/dQw4w9WgXcQ)
@[youtube](https://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=feedrec_centerforopenscience_index)
@[youtube](http://www.youtube.com/user/IngridMichaelsonVEVO#p/a/u/1/QdK8U-VIH_o)
@[youtube](http://www.youtube.com/v/dQw4w9WgXcQ?fs=1&hl=en_US&rel=0)
@[youtube](http://www.youtube.com/watch?v=dQw4w9WgXcQ#t=0m10s)
@[youtube](http://www.youtube.com/embed/dQw4w9WgXcQ?rel=0)
@[youtube](http://www.youtube.com/watch?v=dQw4w9WgXcQ)
@[youtube](http://youtu.be/dQw4w9WgXcQ)
Currently supported services
- YouTube