diff --git a/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js index 1f3907eac62..823f9185bba 100644 --- a/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js +++ b/addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js @@ -200,6 +200,7 @@ export class OdooEditor extends EventTarget { toSanitize: true, isRootEditable: true, placeholder: false, + showEmptyElementHint: true, defaultLinkAttributes: {}, plugins: [], getContentEditableAreas: () => [], @@ -2729,10 +2730,12 @@ export class OdooEditor extends EventTarget { } } - for (const [selector, text] of Object.entries(selectors)) { - for (const el of this.editable.querySelectorAll(selector)) { - if (!this.options.isHintBlacklisted(el)) { - this._makeHint(el, text); + if (this.options.showEmptyElementHint) { + for (const [selector, text] of Object.entries(selectors)) { + for (const el of this.editable.querySelectorAll(selector)) { + if (!this.options.isHintBlacklisted(el)) { + this._makeHint(el, text); + } } } } diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 92e09ab2e72..cc603d1c326 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -138,6 +138,7 @@ const Wysiwyg = Widget.extend({ isRootEditable: this.options.isRootEditable, placeholder: this.options.placeholder, powerboxFilters: this.options.powerboxFilters || [], + showEmptyElementHint: this.options.showEmptyElementHint, controlHistoryFromDocument: this.options.controlHistoryFromDocument, getContentEditableAreas: this.options.getContentEditableAreas, defaultLinkAttributes: this.options.userGeneratedContent ? {rel: 'ugc' } : {}, diff --git a/addons/website/static/src/js/menu/edit.js b/addons/website/static/src/js/menu/edit.js index 253cd51910b..2113fd01e83 100644 --- a/addons/website/static/src/js/menu/edit.js +++ b/addons/website/static/src/js/menu/edit.js @@ -417,6 +417,7 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({ controlHistoryFromDocument: true, getContentEditableAreas: this._getContentEditableAreas.bind(this), powerboxCommands: this._getSnippetsCommands(), + showEmptyElementHint: false, }, collaborationConfig); return wysiwygLoader.createWysiwyg(this, Object.assign(params, this.wysiwygOptions),