From 4fb40830fce54df19cfdcb43a83616f4cd2c952e Mon Sep 17 00:00:00 2001 From: Ali HAMDI Date: Tue, 12 Dec 2023 18:19:54 +0100 Subject: [PATCH] fix: remove unneeded editor resizing after uploading an image - EXO-67793 (#2245) After copying pasting an image, the content of the note/news is hidden and we have a blank sheet. The fix removes an unneeded resizing instruction of the editor that was setting the height to 0. --- .../src/main/webapp/eXoPlugins/uploadImage/plugin.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/resources-wcm/src/main/webapp/eXoPlugins/uploadImage/plugin.js b/apps/resources-wcm/src/main/webapp/eXoPlugins/uploadImage/plugin.js index cd47c00679b..777c06f5613 100644 --- a/apps/resources-wcm/src/main/webapp/eXoPlugins/uploadImage/plugin.js +++ b/apps/resources-wcm/src/main/webapp/eXoPlugins/uploadImage/plugin.js @@ -169,12 +169,7 @@ } }).then(uuid => { if (uploadFinished && !uploadError) { - self.replaceWith(''); - if (editor.resizeEditor) { - editor.resizeEditor(); - } else if (editor.resize) { - editor.resize(); - } + self.replaceWith(''); setTimeout(function() { editor.execCommand('autogrow'); }, 500);