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>&lt;ul&gt;<br>&nbsp;&nbsp;&nbsp; &lt;li&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Test1 Test2<br>&nbsp;&nbsp;&nbsp; &lt;/li&gt;<br>&lt;/ul&gt;</pre><p>After paragraph embed:</p> <pre>&lt;ul&gt;<br>&nbsp;&nbsp;&nbsp; &lt;li&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Test1&amp;nbsp;<br>&nbsp;&nbsp;&nbsp; &lt;/li&gt;<br>&lt;/ul&gt;<br>&lt;drupal-paragraph data-embed-button="callout" data-entity-label="Embed Callout" data-paragraph-id="9f2ab784-59be-41e1-a2b5-a22cb54a25a7" data-paragraph-revision-id="2400"&gt;&amp;nbsp;&lt;/drupal-paragraph&gt;<br>&lt;ul&gt;<br>&nbsp;&nbsp;&nbsp; &lt;li&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Test2<br>&nbsp;&nbsp;&nbsp; &lt;/li&gt;<br>&lt;/ul&gt;</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