laveroadmin / ckeditor
Integrate CKEditor 5 into LaveroAdmin
v1.1.7
2026-11-30 05:14 UTC
Requires
- php: >=8.1
- laravel/framework: ^10.0|^11.0|^12.0|^13.0
- laveroadmin/laveroadmin: ^1.0
Requires (Dev)
- laravel/laravel: >=8.0
- phpunit/phpunit: ~6.0|^7.0|^8.0|^9.0|^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Integrates CKEditor 5 (Super Build) into LaveroAdmin form fields with Media Manager modal integration and fullscreen mode.
Repository: https://github.com/LaveroAdmin/ckeditor
Installation
composer require laveroadmin/ckeditor
CKEditor 5 assets and translations are loaded automatically from CDN (https://cdn.ckeditor.com/ckeditor5/41.4.2/super-build/) or from your custom js_path.
Configuration
In config/admin.php, add configuration under the extensions section. You can specify any CKEditor 5 options either directly or inside a config array:
'extensions' => [ 'ckeditor' => [ // Enable or disable extension 'enable' => true, // Optional custom JS path (overrides CDN) // 'js_path' => 'vendor/ckeditor5/ckeditor.js', // Optional extra scripts and styles // 'js' => ['path/to/custom-plugin.js'], // 'css' => ['path/to/custom.css'], // Toggle Media Manager button (default true) // 'media_browse' => true, // CKEditor 5 options can be set directly at top level: 'language' => 'ru', // Or grouped under 'config' => [...]: 'config' => [ 'toolbar' => [ 'items' => [ 'undo', 'redo', '|', 'heading', '|', 'bold', 'italic', 'underline', 'strikethrough', 'removeFormat', '|', 'bulletedList', 'numberedList', '|', 'link', 'insertTable', 'blockQuote', 'codeBlock', 'sourceEditing', ], 'shouldNotGroupWhenFull' => true, ], ], ] ]
Usage
Use the ckeditor field in form definitions:
$form->ckeditor('content'); // Fluent configuration methods $form->ckeditor('content') ->language('ru') ->toolbar([ 'items' => ['undo', 'redo', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList'], ]); // Pass custom CKEditor 5 options $form->ckeditor('content')->config(['placeholder' => 'Start writing...']); $form->ckeditor('content')->options(['language' => 'en']); // Disable Media Manager button if needed $form->ckeditor('content')->disableMediaBrowse();
License
Licensed under The MIT License (MIT).
Thanks
- Special thanks to open-admin for open-admin development.
- Special thanks to z-song for original development.