[IMP] web_editor: render templates insertion collaborative-friendly

In Knowledge, there is a custom `KnowledgeHtmlField` which adds a menu
placeholder if the `HtmlField` value is empty. It evaluates if it is empty after
each `historyStep`.

This commit introduces new collaborative step events so that the
`KnowledgeHtmlField` is able to properly hide/show that menu even after a
collaborator made the value empty.

task-3378266

X-original-commit: odoo/odoo@b6f103bd3e
Part-of: odoo/odoo#128962
This commit is contained in:
abd-msyukyu-odoo
2023-07-28 14:53:42 +02:00
parent 2c847afb3b
commit b19f2f9166
@@ -1160,6 +1160,7 @@ export class OdooEditor extends EventTarget {
this._handleCommandHint();
this.multiselectionRefresh();
this.observerActive();
this.dispatchEvent(new Event('historyResetFromSteps'));
}
historyGetMissingSteps({fromStepId, toStepId}) {
const fromIndex = this._historySteps.findIndex(x => x.id === fromStepId);
@@ -1661,6 +1662,7 @@ export class OdooEditor extends EventTarget {
this.historyResetLatestComputedSelection();
this._handleCommandHint();
this.multiselectionRefresh();
this.dispatchEvent(new Event('onExternalHistorySteps'));
}
// Multi selection