Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- It’s now possible to set the “Config Options” setting to a JS or JSON file within `config/ckeditor/`. ([#540](https://github.com/craftcms/ckeditor/pull/540))
- It’s now possible to set the “Custom Styles” setting to a CSS file within `config/ckeditor/`. ([#540](https://github.com/craftcms/ckeditor/pull/540))
- The v5 migration now automatically creates JS/JSON/CSS files within `config/ckeditor/` for any Config Options/Custom Styles from CKEditor Configs that were used by two or more fields. ([#540](https://github.com/craftcms/ckeditor/pull/540))
- Fixed an error that could occur when registering a custom CKEditor plugin. ([#531](https://github.com/craftcms/ckeditor/issues/531))

## 5.2.1 - 2026-03-18

Expand Down
7 changes: 6 additions & 1 deletion src/helpers/CkeditorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ public static function registerPackage(string $name, array $config): void
$plugins = $config['plugins'] ?? [];
$toolbarItems = $config['toolbarItems'] ?? [];

self::$pluginsByPackage[$name] = $plugins;
if (!isset(self::$pluginsByPackage[$name])) {
self::$pluginsByPackage[$name] = $plugins;
} else {
self::$pluginsByPackage[$name] = array_unique(array_merge(self::$pluginsByPackage[$name], $plugins));
}

self::$toolbarItems[] = $toolbarItems;
self::$pluginButtonMap[] = [
'plugins' => $plugins,
Expand Down
Loading