diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index c6f989fc970..47f021727c4 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1091,6 +1091,7 @@ var SnippetsMenu = Widget.extend({ 'user_value_widget_opening': '_onUserValueWidgetOpening', 'user_value_widget_closing': '_onUserValueWidgetClosing', 'reload_snippet_template': '_onReloadSnippetTemplate', + 'request_editable': '_onRequestEditable', }, // enum of the SnippetsMenu's tabs. tabs: { @@ -3052,6 +3053,13 @@ var SnippetsMenu = Widget.extend({ _onRedo: async function() { this.options.wysiwyg.redo(); }, + /** + * @private + * @param {OdooEvent} ev + */ + _onRequestEditable: function (ev) { + ev.data.callback($(this.options.wysiwyg.odooEditor.editable)); + }, }); return {