Download the PHP package gcdinsmore/markdown-it-youtube-php without Composer
On this page you can find all versions of the php package gcdinsmore/markdown-it-youtube-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gcdinsmore/markdown-it-youtube-php
More information about gcdinsmore/markdown-it-youtube-php
Files in gcdinsmore/markdown-it-youtube-php
Package markdown-it-youtube-php
Short Description YouTube Markdown plugin for markdown-it-php
License MIT
Homepage https://github.com/gcdinsmore/markdown-it-youtube-php
Informations about the package markdown-it-youtube-php
markdown-it-youtube-php
This is a plugin for the markdown-it-php Markdown parser by Kenji Yasuda. It allows you to easily embed YouTube videos into your Markdown enabled website, without allowing HTML.
Table of Contents
- Install
- Syntax
- License
Install
composer:
Simple
Init with options
Details of the options
Option | Default | Description |
---|---|---|
class | Specify a class attribute for the iframe. Use this to style iframes. | |
height | 480px | The height attribute of the YouTube iframe |
origin | This is the origin argument of the embedded URL. According to YouTube, this can help prevent malicious JavaScript from hijacking your YouTube videos. | |
width | 270px | The width attribute of the YouTube iframe |
Syntax
YoutubeIt syntax is similar to the standard image Markdown syntax, except you add yt after the initial exclamation point. The text inside the square brackets is used as the alt text. The optional text after the URL is used as the title.
The URL portion can be just the video ID, or it can be the URL from the YouTube page.
The reference style syntax is supported as well.
License
I'm using the same MIT license that markdown-it and markdown-it-php are using.