From 44a52a503939173e5558fed22f08245120d03db6 Mon Sep 17 00:00:00 2001 From: Emil Sedgh Date: Wed, 1 Jan 2020 01:15:02 -0800 Subject: [PATCH] Read avoidInlineStyle from config not from attributes If you change config after the initial configuration (like grapesjs-mjml does) it wont be reflected on editor.attributes.avoidInlineStyle. This means ComponentView in some cases will not respect the configuration. --- src/dom_components/view/ComponentView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 35932cefb..1231ef0ea 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -208,7 +208,7 @@ export default Backbone.View.extend({ const em = this.em; const model = this.model; - if (em && em.get('avoidInlineStyle')) { + if (em && em.getConfig('avoidInlineStyle')) { this.el.id = model.getId(); const style = model.getStyle(); !isEmpty(style) && model.setStyle(style);