ckeditor_media_resize
4,306 sites
Security covered
Introduces the ability to arbitrarily re-scale image media embedded via Drupal core's media embed plugin in CKEditor5.
Features
Drupal core's ckeditor5 image embed feature allows scaling of images once an image is uploaded and inserted into the ckeditor5 instance. The rescaling works via draggable handles on each corner of an embedded image. Drupal core also allows embedding of images via the media embed ckeditor5 plugin. Unfortunately embedded media images can't be resized at this point and this module here adds exactly this missing functionality.
Post-Installation
In order to re-scale embedded image media in ckeditor5, follow these steps after installing it as usual via composer:
- Enable the module via the UI or via Drush.
- Head to /admin/config/content/formats, select the text format you want to enable media resizing for and edit the format.
- Enable the Media embed button in the toolbar configuration by drag and dropping it from the available buttons into the toolbar.
- Enable the filters Limit allowed HTML tags and correct faulty HTML, Resize media images and Embed media. The Resize media images filter needs to run before the Embed media filter.
- Configure the Embed media filter to allow at least the Image media bundle to be inserted. Resizing for other media bundles is not supported at this point.