Skip to content

Fix issue with pasting images in RTE

Himanshu Kapoor requested to merge himkp-fix-paste-image-rte into master

What does this MR do and why?

Fix issue with pasting images in RTE

In rich text editor, when pasting images, they used to be identified by their filename. However, each pasted image usually has the same filename "image.png" which caused conflicts in undoing and pasting new images. This commit fixes that issue.

Changelog: fixed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen Recording 2024-01-18 at 22.50.46.mov Screen Recording 2024-01-18 at 22.51.52.mov

How to set up and validate locally

  1. In wikis, issues or MRs, try rich text editor.
  2. Take a screenshot, and try to paste the image in the editor.
  3. Image paste would fail on the second attempt previously (see error in console), but this MR fixes that.

Merge request reports

Loading