[FIX] web_editor: replace button should replace the image then add another

Before this commit:

Replace button was adding another image without replacing the existing one.

After this commit:

Now replace button replaces the existing image with another one.

Task-2895601

closes odoo/odoo#98513

X-original-commit: 3e8db4fa7a2d8eb9eba4b184e33bb3a6f69ce687
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
shsa-odoo
2022-08-22 08:57:50 +02:00
committed by Hiral Bhavsar
parent 42e9502ffc
commit e8c66dc10a
@@ -1346,7 +1346,7 @@ const Wysiwyg = Widget.extend({
break;
case 'media-insert':
case 'media-replace':
this.openMediaDialog();
this.openMediaDialog({ node: this.lastMediaClicked });
break;
case 'media-description':
new weWidgets.AltDialog(this, {}, this.lastMediaClicked).open();