[FIX] web_editor: remove contenteditable attribute in converted email

When converting html for emails, contenteditable attributes should be
removed.

X-original-commit: 9b4cff9f6ab8e1738f3fc486875f9e4ab16cea9d
Part-of: odoo/odoo#111778
This commit is contained in:
Antoine Guenet
2023-02-03 10:35:52 +01:00
parent 70c1412bb2
commit 32a7c01a5c
@@ -609,6 +609,9 @@ async function toInline($editable, cssRules, $iframe) {
enforceImagesResponsivity(editable);
await flattenBackgroundImages(editable);
// Remove contenteditable attributes
[editable, ...editable.querySelectorAll('[contenteditable]')].forEach(node => node.removeAttribute('contenteditable'));
// Hide replaced cells on Outlook
for (const toHide of editable.querySelectorAll('.mso-hide')) {
const style = toHide.getAttribute('style') || '';