[FIX] mass_mailing: issue when pasting html in email marketing
Before this commit: When you try to copy paste html in code view of email marketing then in preview it will show the code instead of template. After this commit: Now when you try to paste html in code view of email marketing then it will show template preview as a result. task-3473633 X-original-commit: 5cd1a900d89c34877be2c1036ad52d8b4a70c849 Part-of: odoo/odoo#139384
This commit is contained in:
@@ -101,7 +101,7 @@ export class MassMailingWysiwyg extends Wysiwyg {
|
||||
const initialDropZone = this.$editable[0].querySelector('.o_mail_wrapper_td');
|
||||
const parsedHtml = new DOMParser().parseFromString(currentValue, "text/html");
|
||||
if (initialDropZone && !parsedHtml.querySelector('.o_mail_wrapper_td')) {
|
||||
initialDropZone.replaceChildren(currentValue);
|
||||
initialDropZone.replaceChildren(...parsedHtml.body.childNodes);
|
||||
} else {
|
||||
super.setValue(...arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user