trix
trix copied to clipboard
Text after closing list tag is added to list
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
+1
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>