Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293910

Allow sites to programmatically opt in to accept more image type uploads in CKEditor 5: TIFF, SVG…

$
0
0

Problem/Motivation

Currently, Drupal 9.3.13 CKEditor 5 does not support SVG Images to upload. SVGs are insecure to serve but the SVG image module sanitizes SVG files. Since the SVG image module sanitizes the file, it will need a way to communicate with the CKEditor5 image uploader, that it is safe to upload the file. Also CKEditor5 supports ".webp" files, but there is currently no way to mark them as uploadable, other than changing magic strings in core.

Proposed resolution

Demonstrate how to alter CKEditor5 plugin info to add custom file type to the image Upload plugin.
Add an alter hook to modify the list of allowed extensions for the image upload plugin.
Update the CKEditor5ImageController to call that alter hook.

MR to use

MR 5295 = 11.x

Remaining tasks

  1. Write a patch
  2. Update issue summary
  3. Review and feedback
  4. RTBC and maintainer feedback
  5. Commit

User interface changes

None but implementing the API will allow uploading and dragging and dropping of new types of images.

API changes

None.

Data model changes

None.

Release notes snippet

It's now possible to alter the ckeditor5_imageUpload plugin definition to allow uploads of additional file types, such as TIFF or SVG.

Original report by sandeepraib

Currently, Drupal 9.3.13 ckeditor 5 does not support SVG Images to upload.


Viewing all articles
Browse latest Browse all 293910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>