mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 08:21:37 +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
1 changed files with 6 additions and 0 deletions
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
|
cache_suffix: '?v=6.5.1-19', // This suffix should be changed any time library is updated
|
||||||
selector,
|
selector,
|
||||||
skin: false,
|
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_css: false,
|
||||||
content_style: contentStyle,
|
content_style: contentStyle,
|
||||||
convert_urls: false,
|
convert_urls: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue