[FIX] web_editor: use iframe only for html widget with style-inline mode
This commit is contained in:
@@ -65,12 +65,17 @@ var FieldTextHtmlSimple = widget.extend({
|
||||
this.$content = $();
|
||||
|
||||
if (this.get("effective_readonly")) {
|
||||
this.$textarea.hide().after('<iframe class="o_readonly"/>');
|
||||
setTimeout(function () {
|
||||
self.$content = $("body", self.$('iframe').contents()[0]);
|
||||
self.$content.html(self.text_to_html(self.get('value')));
|
||||
self.resize();
|
||||
});
|
||||
if (this.options['style-inline']) {
|
||||
this.$textarea.hide().after('<iframe class="o_readonly"/>');
|
||||
setTimeout(function () {
|
||||
self.$content = $("body", self.$('iframe').contents()[0]);
|
||||
self.$content.html(self.text_to_html(self.get('value')));
|
||||
self.resize();
|
||||
});
|
||||
} else {
|
||||
this.$content = $('<div class="note-editable o_readonly"/>');
|
||||
this.$textarea.hide().after(this.$content);
|
||||
}
|
||||
} else {
|
||||
this.$textarea.summernote(this._config());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user