diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 27d1aae1c03..c24a3e79071 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -96,6 +96,21 @@ var Wysiwyg = Widget.extend({ this._modeConfig = { id: 'edit', rules: [ + { + selector: [ + (node) => { + return !node.closest(ancestor => { + return ( + ancestor instanceof this.JWEditorLib.OdooStructureNode || + ancestor instanceof this.JWEditorLib.OdooFieldNode + ); + }); + }, + ], + properties: { + editable: { value: false }, + }, + }, { selector: [ (node) => {