-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Hello,
I’m opening this issue to report a compatibility problem we encountered while migrating from Trix to Lexxy. Our application currently uses Trix, and during testing, we noticed some unusual behavior related to line breaks.
We tested with the following setup:
- Trix version: 2.1.15
- lexxy version: 0.1.8-beta
Here’s an example Trix field body that illustrates the problem:
<div class="trix-content">
<div>
Initial text. <em>Italic Text</em>. <strong>Bold text</strong>.<br>
Testing here. <br><br>
</div>
<h1>First header.</h1>
<ul>
<li>List one</li>
<li>List two</li>
<li>List three</li>
</ul>
<div>
Adding a PDF here:
<action-text-attachment
sgid="SGID_PLACEHOLDER_1"
content-type="application/pdf"
url="https://example.com/blobs/redirect/ID_PLACEHOLDER_1/acme-store.pdf"
filename="acme-store.pdf"
filesize="283424"
presentation="gallery"
caption=""
>
<figure class="attachment attachment--file attachment--pdf">
<figcaption class="attachment__caption">
<span class="attachment__name">acme-store.pdf</span>
<span class="attachment__size">277 KB</span>
</figcaption>
</figure>
</action-text-attachment>
Now files:
</div>
<div class="attachment-gallery attachment-gallery--2">
<action-text-attachment
sgid="SGID_PLACEHOLDER_2"
content-type="image/png"
url="https://example.com/blobs/redirect/ID_PLACEHOLDER_2/acme-file-1.png"
filename="acme-file-1.png"
filesize="151268"
width="530"
height="330"
previewable="true"
presentation="gallery"
caption=""
>
<figure class="attachment attachment--preview attachment--png">
<img src="https://example.com/representations/redirect/ID_PLACEHOLDER_3/acme-file-1.png">
<figcaption class="attachment__caption">
<span class="attachment__name">acme-file-1.png</span>
<span class="attachment__size">148 KB</span>
</figcaption>
</figure>
</action-text-attachment>
<action-text-attachment
sgid="SGID_PLACEHOLDER_3"
content-type="image/png"
url="https://example.com/blobs/redirect/ID_PLACEHOLDER_4/acme-file-2.png"
filename="acme-file-2.png"
filesize="45997"
width="298"
height="136"
previewable="true"
presentation="gallery"
caption=""
>
<figure class="attachment attachment--preview attachment--png">
<img src="https://example.com/representations/redirect/ID_PLACEHOLDER_5/acme-file-2.png">
<figcaption class="attachment__caption">
<span class="attachment__name">acme-file-2.png</span>
<span class="attachment__size">44.9 KB</span>
</figcaption>
</figure>
</action-text-attachment>
</div>
</div>Image of the body being rendered with Trix:
Image of the same body being render with Lexxy:
The main issue we’ve observed is that when inserting a line break next to the Adding a PDF here text, the cursor unexpectedly jumps to the end of the editor (below the last image).
CleanShot.2025-09-30.at.00.11.05.mp4
I’m happy to provide additional details if helpful. I also understand Lexxy may not aim for full compatibility with Trix at this stage, but I wanted to share this in case it serves as a useful test case.
Best,
Thiago