Search by

laveroadmin / ckeditor

BespredeL

Integrate CKEditor 5 into LaveroAdmin

Package info

github.com/LaveroAdmin/ckeditor

Homepage

pkg:composer/laveroadmin/ckeditor

Statistics

Installs: 18

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.7 2026-11-30 05:14 UTC

This package is auto-updated.

Last update: 2026-11-30 05:15:38 UTC


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.