CKEditor 5: Default image CSS classes are not automatically applied

Created on 30 January 2023, almost 2 years ago
Updated 8 April 2024, 10 months ago

Problem/Motivation

Default image CSS Classes set in the drupal config are not applied automatically (without submitting the editor advanced image form).

Steps to reproduce

  1. Edit a ckeditor 5 textformat
  2. Add Default image class(es)
  3. Upload an image and don't open the editor advanced image dialog form
  4. After saving the default image class is not applied

Proposed resolution

The execute function in EditorAdvancedImageCommand.js is only executed when the form is saved. I added an execute function call in the refresh function.
this.execute(this.attributes);

🐛 Bug report
Status

RTBC

Version

2.1

Component

Code

Created by

🇩🇪Germany mvogel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024