Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sonata Ckeditor Bundle Laravel Package

nucleos/sonata-ckeditor-bundle

Integrates CKEditor into Sonata Admin, providing a rich text editor for admin forms and content fields. This bundle helps add WYSIWYG editing to Sonata-based Symfony applications with simple configuration and familiar CKEditor tooling.

View on GitHub
Deep Wiki
Context7

Getting Started

This is not a Laravel package — it's a Symfony bundle (nucleos/sonata-ckeditor-bundle) that wires CKEditor into Sonata Admin form types. As a Laravel developer, you won't composer require this into a Laravel app; it depends on Symfony's DI container, sonata-project/admin-bundle, and Symfony asset/configuration conventions. The realistic "first use" is one of two cases:

  • You're maintaining a Symfony/Sonata project alongside your Laravel work: install via composer require nucleos/sonata-ckeditor-bundle, enable it in bundles.php, register the form type in your Sonata admin classes, and configure via config/packages/nucleos_sonata_ck_editor.yaml.
  • You're on Laravel and just want CKEditor in an admin UI: look at unisharp/laravel-ckeditor, Filament's RichEditor/TinyMCE plugins, or a plain @ckeditor/ckeditor5-build-classic asset bundle. This bundle's API surface (Symfony form types, Sonata admin extensions) doesn't translate.

Best starting point if you do touch it: the bundle's Resources/config for the form-type service definitions, and the Sonata Admin docs for how sonata_type_ckeditor fields are consumed. First use case: replacing a plain textarea in a Sonata admin CRUD form with a rich-text editor.

Implementation Patterns

Patterns worth understanding (and porting conceptually to Laravel):

  • Form-type-as-service: The bundle exposes a Symfony form type so Sonata admin classes just declare a field type. In Laravel the analogue is a custom Blade component or a Filament/Tall-stack field, registered once and reused across resources.
  • Config-driven editor options: Editor config (toolbar, plugins, height) is centralized in YAML and injected. Mirror this in Laravel with a config/ckeditor.php file plus a service provider that publishes assets and passes options to the view — keeps editor config out of controllers and Vue/Blade markup.
  • Asset publishing: The bundle handles CKEditor asset inclusion via Symfony's asset pipeline. In Laravel, use php artisan vendor:publish --tag=ckeditor-assets (or Vite) rather than hand-copying CKEditor builds.
  • Integration with admin tooling: Everything here assumes Sonata Admin's CRUD layer. If you need the same capability in Laravel, reach for Filament, Nova, Backpack, or Orchid — each has a comparable rich-text integration and won't require fighting Symfony conventions.

Gotchas and Tips

  • Symfony coupling: Every extension point (event subscribers, DI compiler passes, Sonata admin extensions) is Symfony-flavored. Don't try to shoehorn this into Laravel — you'd be pulling in half of Symfony's HttpKernel for an editor field.
  • The 1.2.0 release is a maintenance fix: it only resolves a Symfony deprecation (PR #97). No new features, no breaking changes, nothing Laravel-relevant. If you're pinned to it for a Symfony/Sonata install, bumping is safe; there's no reason to upgrade for its own sake.
  • CKEditor version: This bundle historically targets CKEditor 4.x in Sonata Admin. If you need CKEditor 5 features (modern toolbars, collaboration), neither this bundle nor a naive integration will cut it — plan for a custom CKEditor 5 build with your own adapter.
  • Deprecation churn: The fact that 1.2.0 is only a deprecation fix signals the bundle follows Symfony's deprecation cadence closely. Pin to compatible Symfony/Sonata versions and watch for future major bumps tied to Symfony LTS transitions.
  • Debugging editor rendering: When the editor doesn't appear, the failure is almost always (a) assets not published/loaded, or (b) Sonata's field type not matching the registered service ID. Check the browser network tab for the CKEditor build first, then the Symfony service container.
  • Extension point to know: If you must extend behavior, Symfony's prePersist/preUpdate Sonata admin hooks (via AdminExtension or event subscribers) are where rich-text sanitization typically belongs — not in the editor config. Sanitize on save, regardless of stack.
  • Verdict for a Laravel dev: treat this as a reference implementation for "how to package a rich-text field with configurable options and asset publishing." Copy the ideas, not the code.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment