trix icon indicating copy to clipboard operation
trix copied to clipboard

Text after closing list tag is added to list

Open koenvanzuijlen opened this issue 7 years ago • 2 comments

Same issue as #663, but still occuring in 1.2.1

When you use an input element to load stored HTML and it has an unordered list in it, any text that comes after the list closing tag is handled as if it is part of the last list item.

Steps to Reproduce

This code reproduces the issue:

<input id="x" type="hidden" name="content" value="<ul><li>Item 1</li><li>Item 2</li></ul>This should not be in the list" />

<trix-editor input="x">
</trix-editor>
Details
  • Trix version: 1.2.1
  • Browser name and version: Any
  • Operating system: Any

koenvanzuijlen avatar Nov 25 '19 08:11 koenvanzuijlen

+1

pataar avatar Nov 28 '19 10:11 pataar

Until this issue is fixed, you can work around it by putting the trailing text in a <div>:

<input id="x" type="hidden" name="content" 
  value="<ul><li>Item 1</li><li>Item 2</li></ul><div>This should not be in the list</div>">

<trix-editor input="x"></trix-editor>

javan avatar Dec 18 '19 13:12 javan