Merge pull request #6558 from ivanscinote/SCI-9597-image-can-not-be-edited-in-rtf

Add timestap to bypass Chrome cache for TinyMCE images [SCI-9597]
This commit is contained in:
Martin Artnik 2023-11-03 11:03:53 +01:00 committed by GitHub
commit 58acb2ec05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -205,6 +205,12 @@ window.TinyMCE = (() => {
cache_suffix: '?v=6.5.1-19', // This suffix should be changed any time library is updated
selector,
skin: false,
editimage_fetch_image: img => new Promise((resolve) => {
// Appending a timestamp to an image URL bypasses Chromes cache, resolving occasional CORS errors
fetch(img.src + '?t=' + new Date().getTime())
.then(response => response.blob())
.then(blob => resolve(blob));
}),
content_css: false,
content_style: contentStyle,
convert_urls: false,