simba77 / ckeditor-media-embed
该库用内容预览的HTML代码替换了CKEditor 5的语义输出
2.0
2023-12-17 10:53 UTC
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
该库用内容预览的HTML代码替换了CKEditor 5的语义输出。
安装
推荐使用Composer进行安装。运行以下命令安装包并将它添加到项目的composer.json中。
composer require johncms/ckeditor-media-embed
示例
$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);
许可证
simba77/ckeditor-media-embed 库使用MIT许可证(MIT)授权。
更多信息请查看LICENSE。