TipTap RichEditor: trouble with lists

I'm editing some HTML rich content under Filament v4. I've observed that the editor makes editing lists nearly impossible if the list items don't contain paragraph tags. To reproduce: My model's data contains the following HTML snippet:
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
When viewed in the TipTap editor, I cannot or delete certain items in the list. I can't even place the cursor inside some list items with the mouse or arrow keys. However, if I change the snippet to the following, the issues are resolved:
<ul>
<li><p>one</p></li>
<li><p>two</p></li>
<li><p>three</p></li>
<li><p>four</p></li>
</ul>
<ul>
<li><p>one</p></li>
<li><p>two</p></li>
<li><p>three</p></li>
<li><p>four</p></li>
</ul>
Is this known/expected? Does every list item need a paragraph tag in TipTap? Is it possible that I need to install a non-standard extension? Any help/guidance will be appreciated! Thank you.
1 Reply
awcodes
awcodes2mo ago
This has been an ongoing issue in both tiptap and prosemirror for years. It's not something we can really solve on the Filament end. See: https://github.com/ueberdosis/tiptap/issues/118 https://discuss.prosemirror.net/t/removing-the-default-paragraph-p-inside-a-list-item-li/2745

Did you find this page helpful?