2

Page builder seems to like wrapping everything in a <div> tag. This is causing an issue especially with HTML elements which for some reason is automatically wrapped with...

<div data-content-type="html" data-appearance="default" data-element="main" style="border-style: none; border-width: 1px; border-radius: 0px; margin: 0px; padding: 0px;" data-decoded="true">
    ...
</div>

How do we override this to remove the wrapping <div>?

2
  • I am also looking for the answer. @ScruffyPaws did you get any?
    – Sejal Shah
    Commented Sep 22, 2020 at 11:15
  • Magento Support said it wasn't possible to remove this which is a shame. I was told that PageBuilder requires these. I wish they used the WordPress "Gutenberg" approach by using unobtrusive HTML comments instead of vomiting out DIVs everywhere. Commented Sep 23, 2020 at 18:45

2 Answers 2

4

Sadly, after contacting Magento Support, they said it wasn't possible to remove this because PageBuilder relies on these. I wish they used the WordPress "Gutenberg" approach by using unobtrusive HTML comments instead of vomiting out DIVs everywhere...

0

Since that still there is no options for disabling wrapping DIV, I will point to the solution suggested here by BeardMan:

In page builder when creating CMS block add class=> ignore-div then add style for it

.ignore-div {display: contents;}

This will ignore wrapper, eg. behave like that it no exist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.