#>pretext_field_lab

External Probe / Text Layout Engine

Pretext Field Lab

This is a small observatory for Pretext.js: one prepared text handle, several widths, and a live view of how lines reflow without touching DOM measurement APIs.

?["line_break_observatory"]

Line Break Observatory

Edit the text, change the width, and watch the same prepared handle fan out across phone, tablet, and poster surfaces.

Loading Pretext.js and waiting for fonts…

Probe Telemetry

handle warming up
mode pre-wrap
characters 0
widest wrap 0px
  • Prepare phase runs when text or whitespace mode changes.
  • Layout phase reruns as widths change.
  • Rendering shows the actual lines returned by the library.
.phone

Phone width

Waiting for layout…

.tablet

Tablet width

Waiting for layout…

.poster

Poster width

Waiting for layout…

~"integration_recipes"

Why Explore It

Chat and stream surfaces

Predict bubble heights before text lands so scrolling and anchoring feel intentional instead of reactive.

Virtualized knowledge lists

Estimate paragraph heights without creating hidden DOM mirrors for every item in the list.

Multilingual interfaces

Use the same API for Latin, CJK, Arabic, Hebrew, Korean, and mixed-script surfaces.

Responsive probes

Prepare once, then ask what the same text would do at phone, tablet, or desktop widths.

This page keeps the demo close to the software surface of the site, while the official playground remains the best place for exhaustive API exploration.