simba77 / ckeditor-media-embed
The library replaces the semantic output of the CKEditor 5 with the html code of the content preview
Installs: 479
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
pkg:composer/simba77/ckeditor-media-embed
Requires
- php: ^8.0
- ext-dom: *
- ext-libxml: *
- imangazaliev/didom: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.15
- slevomat/coding-standard: ^6.4
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.6
README
The library replaces the semantic output of the CKEditor 5 with the html code of the content preview.
Installation
The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's
composer.json
:
composer require johncms/ckeditor-media-embed
Example
$providers = [ new \Simba77\EmbedMedia\Providers\Youtube( [ 'classes' => 'embed-responsive embed-responsive-16by9', 'styles' => [ 'max-width' => '100%', 'width' => '100%', ], ] ), ]; $embed = new \Simba77\EmbedMedia\Embed($providers); $html = '<figure class="media"><oembed url="https://youtu.be/8ZLSKEmbt0Y?t=75"></oembed></figure>'; echo $embed->embedMedia($html);
License
The simba77/ckeditor-media-embed
library is licensed for use under the MIT License (MIT).
Please see LICENSE for more information.