You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,20 +312,24 @@ The command will generate a new content migration, which will need to be run on
312
312
## Adding CKEditor Plugins
313
313
314
314
### First Party plugins
315
-
If you'd like to include any of the [first party packages](https://github.com/ckeditor/ckeditor5/tree/master/packages) from CKEditor, you can add them to the `extraPlugins` property on the `ModifyConfigEvent`.
315
+
If you'd like to include any of the [first party packages](https://github.com/ckeditor/ckeditor5/tree/master/packages) from CKEditor, you can call `CkeditorConfig::registerFirstPartyPackage()` in the `init` function of a custom module.
316
316
317
317
```php
318
-
use craft\ckeditor\events\ModifyConfigEvent;
319
-
use craft\ckeditor\Field;
320
-
use yii\base\Event;
318
+
use craft\ckeditor\helpers\CkeditorConfig;
321
319
322
-
Event::on(
323
-
Field::class,
324
-
Field::EVENT_MODIFY_CONFIG,
325
-
handler: function(ModifyConfigEvent $event) {
326
-
$event->extraPlugins = ['ImageResize'];
320
+
class Site extends BaseModule
321
+
{
322
+
public function init(): void
323
+
{
324
+
parent::init();
325
+
326
+
// Register a package with toolbar items and multiple plugins
0 commit comments