diff --git a/packages/mjml-core/src/createComponent.js b/packages/mjml-core/src/createComponent.js index 0d4c655e5..fb357f873 100644 --- a/packages/mjml-core/src/createComponent.js +++ b/packages/mjml-core/src/createComponent.js @@ -207,7 +207,10 @@ export class BodyComponent extends Component { children = children || this.props.children if (rawXML) { - return children.map((child) => jsonToXML(child)).join('\n') + return children.map((child) => { + child.attributes = {...attributes, ...child.attributes} + jsonToXML(child) + }).join('\n') } const sibling = children.length