Only default icon E for custom embed buttons when using amazon s3

Created on 23 April 2024, about 2 months ago
Updated 6 June 2024, 10 days ago

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

πŸ› Bug report
Status

Needs review

Version

1.5

Component

CKEditor integration

Created by

πŸ‡©πŸ‡ͺGermany rhodes_muc

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024