larcool / ckeditor
CKEditor 5 extension for laravel-admin
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=7.0.0
- encore/laravel-admin: *
Requires (Dev)
- phpunit/phpunit: ~6.0 || ~7.0 || ~9.0
README
Installation
composer require larcool/ckeditor
Then
php artisan vendor:publish --tag=larcool-ckeditor
Configuration
In the extensions
section of the config/admin.php
file, add some configuration that belongs to this extension.
'ckeditor' => [ //Set to false if you want to disable this extension 'enable' => true, // Editor configuration 'config' => [ "simpleUpload"=>[ "uploadUrl"=>'/admin/uploads' ], "fontSize" => [ "options" =>[ 9, 11, 13, 'default', 17, 19, 21 ] ], "toolbar"=>[ "items"=>[ 'heading', 'fontFamily', 'fontSize', 'fontColor', 'fontBackgroundColor', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', '|', 'indent', 'outdent', '|', 'imageUpload', 'blockQuote', 'insertTable', 'mediaEmbed', 'undo', 'redo' ] ], 'image'=>[ 'toolbar'=>['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'], 'resizeUnit'=>'px', 'styles'=>[ // This option is equal to a situation where no style is applied. 'full', 'side', // This represents an image aligned to the left. 'alignLeft', 'alignCenter', // This represents an image aligned to the right. 'alignRight' ] ], "table" =>[ 'contentToolbar'=>[ 'tableColumn', 'tableRow', 'mergeTableCells' ] ], 'language'=>'zh-cn', ] ]
Usage
Form::extend('editor', \larcool\CKEditor\Editor::class);