[FIX] web_editor: On pasting image to editor, it must have 100% default width
Before this commit: On pasting image to editor, the default width was set to auto. After this commit: Now on pasting image to editor, the default width is set to 100%. Task-2862892 closes odoo/odoo#96779 X-original-commit: 2e4811b751960548dc66f6e4ff00495e5226fdbc Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -3106,6 +3106,7 @@ export class OdooEditor extends EventTarget {
|
||||
addImagesFiles(imageFiles) {
|
||||
for (const imageFile of imageFiles) {
|
||||
const imageNode = document.createElement('img');
|
||||
imageNode.style.width = '100%';
|
||||
imageNode.dataset.fileName = imageFile.name;
|
||||
getImageUrl(imageFile).then((url)=> {
|
||||
imageNode.src = url;
|
||||
|
||||
Reference in New Issue
Block a user