FIRST, TRY THIS
drag the blue block
Move it through the paragraph. The available width changes row by row, so the same prepared text gets new line breaks immediately.
waiting for layout…
PRETEXT / TEXT LAYOUT WITHOUT DOM MEASUREMENT
Pretext is a JavaScript text-layout engine. Give it text, a font, and a width; it returns line breaks and geometry without inserting anything into the page.
Loading the local text engine…
FIRST, TRY THIS
Move it through the paragraph. The available width changes row by row, so the same prepared text gets new line breaks immediately.
waiting for layout…
NOW CHANGE A CONSTRAINT
Resize the text column. Pretext answers before a DOM text box has to exist.
waiting for measurement…
FINALLY, USE THE NUMBERS
Pretext predicts every row height. The page can place a tiny rendered window anywhere in the full document.
preparing row templates…
It measures and breaks text. It does not draw the blue block, render the Canvas, choose a card size, or virtualize a list. Those are host-app decisions built from the geometry it returns.