victoire/ckeditor-widget
victoire/ckeditor-widget adds CKEditor widget support to Victoire, letting developers register and render custom editor widgets with minimal configuration. It extends rich-text editing with reusable, configurable widget components.
composer require victoire/ckeditor-widget
Widget/ directory of the package: it contains the widget class (typically CKEditorWidget extends AbstractWidget), its form type (e.g. CKEditorWidgetType), and the matching Twig template under Resources/views/. Read those three files before anything else — the entire package is essentially those files plus config.Resources/config/services.yml autoloading if present), then clear the cache so the page-builder palette picks it up:
php bin/console cache:clear
AbstractWidget convention. The widget class declares getName(), often getWidgetMap(), and any extra data fields via a form type. To customise behaviour (default toolbar, extra button sets, placeholder text), subclass the widget and register your subclass instead of editing vendor code.Form/ directory and overriding the template, not by patching the vendor package.Resources/views/Widget/<widgetName>.html.twig). Drop a template of the same name in your app's templates/ (or app/Resources/ on older Symfony) to override the CKEditor widget's rendering without touching vendor. This is the primary integration point.Widget/BusinessEntity rows) with widget data stored as serialized/JSON fields. When debugging "my text saved but doesn't show", inspect the business entity's stored data before blaming the template — mismatches between form field names and template variable names are the most common failure.CKEDITOR.replace(...) call or a config object passed to the widget). Centralise toolbar config in your app's CKEditor config file and reference it from your overridden template so multiple widgets share one profile rather than duplicating config inline.composer.json requirements before assuming compatibility.bin/console debug:container for the widget registry service) rather than guessing.cache:clear (and on some setups manually clearing var/cache) before investigating further.{{ dump() }} with the debug bundle) or the Symfony profiler's template panel.allowedContent/disallowedContent carefully.How can I help you explore Laravel packages today?