From 207bdece2a72d2e64b02d08fb45cc1e8d14a8135 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 14 Oct 2022 13:36:10 +0300 Subject: [PATCH 1/2] For Bug 52732 --- apps/api/documents/api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 1e2ce2ff4a..fe8979b14b 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -218,6 +218,7 @@ hideRulers: false // hide or show rulers on first loading (presentation or document editor) hideNotes: false // hide or show notes panel on first loading (presentation editor) uiTheme: 'theme-dark' // set interface theme: id or default-dark/default-light + integrationMode: "embed" // turn off scroll to frame }, coEditing: { mode: 'fast', // , 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor @@ -490,6 +491,9 @@ if (target && _checkConfigParams()) { iframe = createIframe(_config); + if (_config.editorConfig.customization && _config.editorConfig.customization.integrationMode==='embed') + _self.createEmbedWorker && _self.createEmbedWorker(); + if (iframe.src) { var pathArray = iframe.src.split('/'); this.frameOrigin = pathArray[0] + '//' + pathArray[2]; From 8a98c718fa6c1c6e701eaf983a0d1fcb99299b36 Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Fri, 14 Oct 2022 14:31:55 +0300 Subject: [PATCH 2/2] Refactoring --- apps/api/documents/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index fe8979b14b..db734ad986 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -492,7 +492,7 @@ if (target && _checkConfigParams()) { iframe = createIframe(_config); if (_config.editorConfig.customization && _config.editorConfig.customization.integrationMode==='embed') - _self.createEmbedWorker && _self.createEmbedWorker(); + window.AscEmbed && window.AscEmbed.initWorker(iframe); if (iframe.src) { var pathArray = iframe.src.split('/');