PHP code example of gcdinsmore / markdown-it-youtube-php
1. Go to this page and download the library: Download gcdinsmore/markdown-it-youtube-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gcdinsmore / markdown-it-youtube-php example snippets
use Kaoken\MarkdownIt\MarkdownIt;
use GCDinsmore\YoutubeIt\YoutubeIt;
$md = new MarkdownIt();
$md->plugin(new YoutubeIt());
echo $md->render("!yt[](sk2pr4XD_kw)");
$md = new MarkdownIt();
$md->plugin(new YoutubeIt([
"width" => "200px",
"height" => "200px",
"origin" => "https://example.com"
]));
echo $md->render("!yt[](sk2pr4XD_kw)");