Formatting lost when attempting to add/edit paragraph within a list item in CKEditor 5
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3405565. -->
Reported by: [zooney](https://www.drupal.org/user/281712)
Related to !16
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>This is a similar issue to <a href="https://www.drupal.org/project/drupal/issues/3381557">https://www.drupal.org/project/drupal/issues/3381557</a>.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Create a list using CKEditor 5 and attempt to insert a paragraph into a list item. The list will be split into two lists and the paragraph inserted either inbetween, before, or after.</p>
<p>Example:</p>
<p>Before paragraphs embed:</p>
<pre><ul><br> <li><br> Test1 Test2<br> </li><br></ul></pre><p>After paragraph embed:</p>
<pre><ul><br> <li><br> Test1&nbsp;<br> </li><br></ul><br><drupal-paragraph data-embed-button="callout" data-entity-label="Embed Callout" data-paragraph-id="9f2ab784-59be-41e1-a2b5-a22cb54a25a7" data-paragraph-revision-id="2400">&nbsp;</drupal-paragraph><br><ul><br> <li><br> Test2<br> </li><br></ul></pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>I believe the issue is that the allowed HTML for CKeditor's Document List support (<a href="https://ckeditor.com/docs/ckeditor5/latest/features/lists/document-lists">https://ckeditor.com/docs/ckeditor5/latest/features/lists/document-lists</a>...) does not allow the drupal-paragraph element to be nested within a list. Is there anything in the CKEditor API that would allow drupal-paragraph to be explicitly able to be nested in list item?</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>-TBD</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>-TBD</p>
> Related issue: [Issue #3381557](https://www.drupal.org/node/3381557)
issue