brgmn / nova-ckeditor
Use CKEditor for Laravel Nova fields.
Installs: 1 014
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0|^8.1
- illuminate/support: ^v9.0
Requires (Dev)
- laravel/framework: ^9.0
- laravel/nova: ^4.0
README
This package includes a custom CKEditor 5 field for Laravel Nova (>= 4.0) including a custom build CKEditor with most official plugins (e.g. code-Plugin, table editor, image captions). If you like CKEditor and the out-of-the-box Trix-Editor is too limited for your usecases this package could be a good alternative for content heavy laravel nova projects.
Installation
You can install the package via composer:
composer require brgmn/nova-ckeditor
Usage
Just use the CKEditor field class in your nova definitions like this:
CKEditor::make('Text', 'body')
->rules('required')
->withFiles('s3-public', 'articles/content')
->options([
'language' => 'de',
'toolbar' => [
'Heading',
'Bold',
'Italic',
'|',
'Link',
'|',
'NumberedList',
'BulletedList',
'codeBlock',
'blockquote',
'insertTable',
'|',
'MediaEmbed',
'imageUpload',
'toggleImageCaption'
],
'mediaEmbed' => [
'previewsInData' => true,
],
'heading' => [
'options'=> [
[ 'model'=> 'heading2', 'view'=> 'h2', 'title'=> 'Heading 2', 'class'=> 'ck-heading_heading2' ],
[ 'model'=> 'heading3', 'view'=> 'h3', 'title'=> 'Heading 3', 'class'=> 'ck-heading_heading3' ]
],
]]),
Screenshot
Security
If you discover any security related issues, please email info@brgmn.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.