]> BookStack Code Mirror - bookstack/commitdiff
Added cache breaker to tinymce loading systems 3303/head
authorDan Brown <redacted>
Tue, 1 Mar 2022 13:41:53 +0000 (13:41 +0000)
committerDan Brown <redacted>
Tue, 1 Mar 2022 13:41:53 +0000 (13:41 +0000)
Takes the version from BookStack app.js paths instead of tinyMCE version
since things external from TinyMCE could be loaded using this.

resources/js/wysiwyg/config.js

index 1b3b6e7b572053989cc4babebee20b6d4a4778d8..25964514897c31ebd4a96385dea8adbe356c1a79 100644 (file)
@@ -221,11 +221,15 @@ export function build(options) {
     // Build toolbar content
     const {toolbar, groupButtons: toolBarGroupButtons} = buildToolbar(options);
 
+    // BookStack Version
+    const version = document.querySelector('script[src*="/dist/app.js"]').getAttribute('src').split('?version=')[1];
+
     // Return config object
     return {
         width: '100%',
         height: '100%',
         selector: '#html-editor',
+        cache_suffix: '?version=' + version,
         content_css: [
             window.baseUrl('/dist/styles.css'),
         ],