infinum/eightshift-frontend-libs

[QUESTION] - New List block

Closed this issue · 1 comments

I m trying to create list ul/li block with block inserter but i can't get it to work.

I use accordion and accordion item as ref block because actually it is same stuff.

The problem is in editor every li element is wrapped with

html<div tabindex="0" data-id="6536effe-9ae8-49cd-a0fc-d674a8f94f52" id="block-6536effe-9ae8-49cd-a0fc-d674a8f94f52" role="document" aria-label="Block: List item" data-block="6536effe-9ae8-49cd-a0fc-d674a8f94f52" data-type="eightshift-boilerplate/alist-item" data-title="List item" class="block-editor-block-list__block wp-block block-alist-item eightshift-block"><li class="block-alist-item">test</li></div>

How to insert block without wrapping?

This is part of the normal BlokEditor layout and not a part of the boilerplate. You can research and see how the core did the implementation of the lists https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list and make the same thing