mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
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:
commit
58acb2ec05
6
app/javascript/packs/tiny_mce.js
vendored
6
app/javascript/packs/tiny_mce.js
vendored
|
@ -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 Chrome’s 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,
|
||||
|
|
Loading…
Reference in a new issue