[FIX] web_editor: use iframe only for html widget with style-inline mode

This commit is contained in:
Christophe Matthieu
2016-01-20 00:15:10 +01:00
parent 44ac7903cc
commit e5112ee00b
+11 -6
View File
@@ -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());