PHP code example of locomotivemtl / charcoal-contrib-embed

1. Go to this page and download the library: Download locomotivemtl/charcoal-contrib-embed 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/ */

    

locomotivemtl / charcoal-contrib-embed example snippets


$this->embedRepository()->embedData('https://youtube.com/{video_id}');
json
{
    "video": {
        "type": "embed",
        "l10n": true,
        "label": "Video",
        "notes": "Absolute URL: <code>https://www.youtube.com/watch?v={video_id}</code>"
    }
}