Blocks type list: items > paragraph tags

First: congrats on the new 3.5 version, very nice!

I’m just trying out some default block types with:

<?= $page->myBlocksField()->toBlocks() ?>

I noticed that the list items in the list block are getting p tags by default:

  <li><p>My list item</p></li>

Is there a way to prevent the addition of those p tags?

I don’t think there is a supported way to prevent this.

If you consider this an issue, please open one at and Bastian can see whether he agrees, since he is the most familiar one with the list field.

I don’t think this a ‘neutral’ implementation of a list (if Bastian agrees or not ;-). Those p tags simply don’t belong in a short list of some kind.
I’m not a github user …

From what I read on Discord, there is already an issue on GitHub, although I couldn’t find it. It is supposed to be fixed in a later release.

1 Like


This problem is caused by the ProseMirror plugin.
When it is resolved in ProseMirror, it will be fixed as soon as possible in Kirby.