summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend/fields.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-02-12 18:08:27 +0100
committerChristophe Simonis <chs@odoo.com>2018-02-12 18:08:27 +0100
commit0f02dcb63918228d48df50f2d5805b7fda25c14a (patch)
tree9f83e1687755404c5cd7b5e1a12ae85d29f2d483 /addons/web_editor/static/src/js/backend/fields.js
parent83354c2b24bc6c9db1fb63440115d2d4db5bd4ef (diff)
parentc69d00157ed2162b873a07a9f317016f109f802a (diff)
[MERGE] forward port branch saas-11.1 up to c69d00157ed
Diffstat (limited to 'addons/web_editor/static/src/js/backend/fields.js')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js
index b84fcd21c91..d3d601bac73 100644
--- a/addons/web_editor/static/src/js/backend/fields.js
+++ b/addons/web_editor/static/src/js/backend/fields.js
@@ -118,6 +118,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
*/
_getValue: function () {
if (this.nodeOptions['style-inline']) {
+ transcoder.linkImgToAttachmentThumbnail(this.$content);
transcoder.classToStyle(this.$content);
transcoder.fontToImg(this.$content);
}
@@ -133,6 +134,8 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
this.$textarea.summernote(this._getSummernoteConfig());
this.$content = this.$('.note-editable:first');
this.$content.html(this._textToHtml(this.value));
+ this.$content.data('oe-id', this.recordData.res_id || this.res_id);
+ this.$content.data('oe-model', this.recordData.model || this.model);
// trigger a mouseup to refresh the editor toolbar
this.$content.trigger('mouseup');
if (this.nodeOptions['style-inline']) {