summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/editor/editor_menu.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/editor_menu.js b/addons/website/static/src/js/editor/editor_menu.js
index 46c3fc0b6b1..b370815ccfd 100644
--- a/addons/website/static/src/js/editor/editor_menu.js
+++ b/addons/website/static/src/js/editor/editor_menu.js
@@ -24,6 +24,7 @@ var EditorMenu = Widget.extend({
},
custom_events: {
request_save: '_onSnippetRequestSave',
+ get_clean_html: '_onGetCleanHTML',
},
/**
@@ -198,6 +199,15 @@ var EditorMenu = Widget.extend({
this.cancel(false);
},
/**
+ * Get the cleaned value of the editable element.
+ *
+ * @private
+ * @param {OdooEvent} ev
+ */
+ _onGetCleanHTML: function (ev) {
+ ev.data.callback(this.wysiwyg.getValue({$layout: ev.data.$layout}));
+ },
+ /**
* Snippet (menu_data) can request to save the document to leave the page
*
* @private