Problem/Motivation

If you use entity_embed 1.5 with Drupal 10, Ckeditor5 and Amazon S3 file system, no SVG items are displayed for custom embed buttons in the toolbar. The cause is in drupalentity.js in line 366. "l.icon.endsWith(svg)" fails because Amazon S3 appends a parameter to the icon URL, e.g. "mypath/mypath.svg?amazonparameterhsakjdahdha

Steps to reproduce

  • Use Amazon S3 as public file system
  • Create custom Embed button with svg icon /admin/config/content/embed
  • Add custom button to ckeditor5 Toolbar /admin/config/content/formats

Proposed resolution

  • Remove parameter before svg check in drupalentity.js
    l.icon = l.icon.split('?')[0];
    if (l.icon.endsWith("svg")) {...

    Same issue in ui.js.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rhodes_muc created an issue. See original summary.

rhodes_muc’s picture

Issue summary: View changes

efpapado made their first commit to this issue’s fork.

efpapado’s picture

Status: Active » Needs review

Created a merge request, please review.