[FIX] web_editor: ensure t-out are inline

Force the sanitization after a dynamic placeholder is inserted.
By default the `<t>` tags are styled as block element,
except if they have the `data-oe-t-inline` attribute set.
The sanitization process ensure the `<t>` tags have this attribute.

With this change the new `<t t-out >` tags added as dynamic placeholder visual
are properly styled as inline elements.

task-3222474

X-original-commit: 08558502ea0726a97c80aae7d1e2084b2bf3952a
Part-of: odoo/odoo#124020
This commit is contained in:
Sébastien Geelen (sge)
2023-06-07 08:59:09 +02:00
parent 623729832f
commit 044f1b2db0
@@ -373,6 +373,8 @@ export class HtmlField extends Component {
const t = document.createElement('T');
t.setAttribute('t-out', dynamicPlaceholder);
this.wysiwyg.odooEditor.execCommand('insert', t);
// Ensure the dynamic placeholder <t> element is sanitized.
this.wysiwyg.odooEditor.sanitize(t);
}
}
onDynamicPlaceholderClose() {