Skip to content

Commit

Permalink
fix: remove unneeded editor resizing after uploading an image - EXO-6…
Browse files Browse the repository at this point in the history
…7793 (#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.
  • Loading branch information
ahamdi committed Dec 13, 2023
1 parent 66a02d9 commit 4fb4083
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,7 @@
}
}).then(uuid => {
if (uploadFinished && !uploadError) {
self.replaceWith('<img src="' + eXo.env.server.context + "/" + eXo.env.portal.rest + "/images/repository/collaboration/" + (uuid ? uuid : "") + '" />');
if (editor.resizeEditor) {
editor.resizeEditor();
} else if (editor.resize) {
editor.resize();
}
self.replaceWith('<img src="' + eXo.env.server.context + "/" + eXo.env.portal.rest + "/images/repository/collaboration/" + (uuid || "") + '" />');
setTimeout(function() {
editor.execCommand('autogrow');
}, 500);
Expand Down

0 comments on commit 4fb4083

Please sign in to comment.