You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Long URLs and unbroken text overflow fixed-width text boxes #25
FYI: The description and suggested approach below were provided by AI.
Description
In @quickdrawjs/[email protected], long URLs or strings without spaces can overflow fixed-width text boxes instead of wrapping within the available width.
We encountered this while embedding Quickdraw in a prescription editor, where pasted text needs to stay within the printable area.
Steps to reproduce
Create a text shape with autosize: false and width 200.
Text wraps within the available width, including when a single word or URL exceeds that width. Wrapping should remain consistent between inline editing, canvas rendering, and image export.
Actual behavior
The oversized token remains on one line and extends beyond the text box.
Possible cause
In packages/core/src/shapes.js, wrapLines() wraps at whitespace boundaries but doesn't split an individual token that exceeds maxW.
Implementation reference
We're using a small local patch that splits oversized lines into smaller measured segments. This addresses our immediate use case; we can share it if helpful.
A general fix should also preserve emoji and combining-character sequences when choosing line breaks, and leave autosized text unchanged.
Activity