Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kosoukhov/yii2-ckeditor-youtube-plugin
https://github.com/kosoukhov/yii2-ckeditor-youtube-plugin
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kosoukhov/yii2-ckeditor-youtube-plugin
- Owner: kosoukhov
- Created: 2021-04-06T09:01:33.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T11:00:24.000Z (over 3 years ago)
- Last Synced: 2024-04-24T15:27:04.424Z (7 months ago)
- Language: PHP
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
YouTube embed CKEditor plugin for Yii2
======================================Yii2 YouTube embed plugin (as widget) for CKEditor based on YouTube embed
[![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](http://www.yiiframework.com/)
[![Latest Stable Version](https://poser.pugx.org/kosoukhov/yii2-ckeditor-youtube-plugin/v)](//packagist.org/packages/kosoukhov/yii2-ckeditor-youtube-plugin) [![Total Downloads](https://poser.pugx.org/kosoukhov/yii2-ckeditor-youtube-plugin/downloads)](//packagist.org/packages/kosoukhov/yii2-ckeditor-youtube-plugin) [![Latest Unstable Version](https://poser.pugx.org/kosoukhov/yii2-ckeditor-youtube-plugin/v/unstable)](//packagist.org/packages/kosoukhov/yii2-ckeditor-youtube-plugin) [![License](https://poser.pugx.org/kosoukhov/yii2-ckeditor-youtube-plugin/license)](//packagist.org/packages/kosoukhov/yii2-ckeditor-youtube-plugin)Based on YouTube embed https://github.com/fonini/ckeditor-youtube-plugin/releases/tag/v2.1.18
Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require kosoukhov/yii2-ckeditor-youtube-plugin "^1.0"
```or add
```
"kosoukhov/yii2-ckeditor-youtube-plugin": "^1.0"
```to the require section of your `composer.json` file.
Usage example:
-------------Once the widget is installed, use it in your code.
You must specify in the plugin dependencies the set of editor Asset to which you connect the plugin.
If you are using the https://github.com/2amigos/yii2-ckeditor-widget then an example code like this:
```php
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()
]
]);
}
}
```If you are using the https://github.com/MihailDev/yii2-ckeditor then an example code like this:
```php
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()
]
]);
}
}
```