PHP code example of kosoukhov / yii2-ckeditor-youtube-plugin

1. Go to this page and download the library: Download kosoukhov/yii2-ckeditor-youtube-plugin 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/ */

    

kosoukhov / yii2-ckeditor-youtube-plugin example snippets


class SetUp implements BootstrapInterface
{
    public function bootstrap($app)
    {
        $container = Yii::$container;

        $container->set(YoutubeEmbed::class, ['depends' => ['dosamigos\ckeditor\CKEditorWidgetAsset']]);

        $container->set(CKEditor::class, [
            'preset' => 'standart',
            'clientOptions' => [
                    'extraPlugins' => $container->get(YoutubeEmbed::class)::getPluginName()
                ]            
        ]);
    }
}

class SetUp implements BootstrapInterface
{
    public function bootstrap($app)
    {
        $container = Yii::$container;

        $container->set(YoutubeEmbed::class, ['depends' => ['mihaildev\ckeditor\Assets']]);

        $container->set(CKEditor::class, [
            'editorOptions' => [
                    'extraPlugins' => $container->get(YoutubeEmbed::class)::getPluginName()
                ]
        ]);
    }
}