Remove “block-editor-inner-blocks” and “block-editor-block-list__layout”
-
Dear all,
I am developing a block that allow to add other blocks inside it using <InnerBlocks/>
However, there are some unexpected divs that appear inside the block wrapper in the editor screen (back-end) with the names “block-editor-inner-blocks” and “block-editor-block-list__layout” respectively.
Because those divs are not making the back-end and the front-end mismatch in terms of HTML structure but also bringing difficulty to decorate the back-end in a similar way as the front-end.
I would like to ask if there is a way to remove “block-editor-inner-blocks” and “block-editor-block-list__layout” inner wrappers.
Here are the codes that show the difference between the back-end and the front-end HTML structure:
BACK-END
<a id="block-d97d1315-fef5-4cc4-872f-7d0b0c4f7b1c" data-type="sneeit-blocks/link" class="block-editor-block-list__block wp-block has-child-selected wp-block-sneeit-blocks-link"> <div class="block-editor-inner-blocks"> <div class="block-editor-block-list__layout" data-is-drop-zone="true"> <span data-type="sneeit-blocks/text"> <span role="textbox" aria-multiline="true" aria-label="Type a Text" contenteditable="true" class="block-editor-rich-text__editable rich-text">Click Here</span> </span> <div class="block-list-appender wp-block"> <div class="components-dropdown block-editor-inserter"> <button type="button" class="components-button block-editor-button-block-appender"> <span class="components-visually-hidden ecfd-dceb-a-ae-bfbed-0 e19lxcc00">Add block</span> <svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"> <path d="M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"></path> </svg> </button> </div> </div> </div> </div> </a>
FRONT-END
<a class="wp-block-sneeit-blocks-link"> <span class="wp-block-sneeit-blocks-text">Click Here</span> </a>
These tags make me feel so daunted about the platform and its future. I feel that I am working with the Blogger platform of Google, not the WordPress modern platform.
Thank you very much.
Regards,
Tien Nguyen
- The topic ‘Remove “block-editor-inner-blocks” and “block-editor-block-list__layout”’ is closed to new replies.