Browse Source

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.
pull/2485/head
Emil Sedgh 7 years ago
parent
commit
44a52a5039
  1. 2
      src/dom_components/view/ComponentView.js

2
src/dom_components/view/ComponentView.js

@ -208,7 +208,7 @@ export default Backbone.View.extend({
const em = this.em; const em = this.em;
const model = this.model; const model = this.model;
if (em && em.get('avoidInlineStyle')) { if (em && em.getConfig('avoidInlineStyle')) {
this.el.id = model.getId(); this.el.id = model.getId();
const style = model.getStyle(); const style = model.getStyle();
!isEmpty(style) && model.setStyle(style); !isEmpty(style) && model.setStyle(style);

Loading…
Cancel
Save