[FIX] web_editor: remove forced source mode
In e29c08969 source mode was reintroduced. Since complex template seemed broken when it was edited, the feature of forcing source mode when there is a `% if ` or `% set` template directive of 12.3 was reintroduced. Since the direct breaking of the template was mostly solved with the added line: `options.prettifyHtml = false;` the force source mode is not so much necessary and there was report that it was not very clear. In this commit it is removed, and if necessary could be reintroduced later with clearer implementation. opw-2123730 fix #40410 closes #40421 closes odoo/odoo#40458 X-original-commit: be30a3ba431cf24a5fcfdfedd0f9d9f73163c717 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
committed by
fw-bot
parent
760ae910d4
commit
a9a2fba683
@@ -485,12 +485,6 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
|
||||
top: '+5px',
|
||||
});
|
||||
this.$el.append($button);
|
||||
// force source editor if it contains multiline Jinja directives
|
||||
if (jinjaRegex.test(this._getValue())) {
|
||||
var layoutInfo = $.summernote.core.dom.makeLayoutInfo(this.wysiwyg.$editor);
|
||||
layoutInfo.toolbar().hide();
|
||||
$.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo, true);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user