summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/backend/field_html.js4
-rw-r--r--addons/web_editor/static/src/js/editor/rte.summernote.js4
2 files changed, 7 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend/field_html.js b/addons/web_editor/static/src/js/backend/field_html.js
index 75548eee4b8..1905c350f7b 100644
--- a/addons/web_editor/static/src/js/backend/field_html.js
+++ b/addons/web_editor/static/src/js/backend/field_html.js
@@ -187,6 +187,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
* @returns {Object}
*/
_getWysiwygOptions: function () {
+ var self = this;
return Object.assign({}, this.nodeOptions, {
recordInfo: {
context: this.record.getContext(this.recordParams),
@@ -221,6 +222,9 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
toolbar.splice(-1, 0, ['view', ['codeview']]);
}
}
+ if ("mailing.mailing" === self.model) {
+ options.noVideos = true;
+ }
options.prettifyHtml = false;
return options;
},
diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js
index 1d8bcce4808..2be70626ab4 100644
--- a/addons/web_editor/static/src/js/editor/rte.summernote.js
+++ b/addons/web_editor/static/src/js/editor/rte.summernote.js
@@ -422,7 +422,9 @@ eventHandler.modules.imageDialog.showImageDialog = function ($editable) {
options: {
lastFilters: ['background'],
onUpload: $editable.data('callbacks').onUpload,
- noVideos: $editable.data('oe-model') === "mail.compose.message",
+ noVideos:
+ $editable.data('oe-model') === "mail.compose.message" ||
+ ($editable.data('options') && $editable.data('options').noVideos),
},
onSave: function (media) {
if(!document.body.contains(media)) {