InternalUse TextClip.beginTextEdit() instead of constructing directly.
Aborts the session: restores the initial text and records nothing.
Finishes the session, recording the whole initial -> final change as ONE undo entry, exactly the entry a single direct edit would have recorded. The clip already renders the final text, so nothing is re-applied and no event is emitted.
The text captured when the session began — what cancel() restores.
Current placement and typography of the text, fresh after every setText() (the sprite is
re-measured synchronously) and after any style change on the clip.
The text currently on the clip.
Live update: renders text on the clip without recording undo. Emits CLIP_UPDATED_TEXT like a
direct edit.
A single interactive text-editing session on one text clip — the text counterpart of BoundsEditSession.
The SDK owns what a host cannot reliably reproduce (the text frame geometry, the renderer's typography as CSS, the live sprite update, undo bookkeeping); the host owns the DOM element (focus, caret, IME, keyboard, mobile). The intended split is: the canvas keeps rendering the glyphs, the host overlays a transparent textarea that only supplies caret, selection and input.
setText()updates the sprite through the normal setter (soCLIP_UPDATED_TEXTkeeps flowing and host mirrors stay in sync) with undo paused.commit()records the initial → final text as a single entry; a session that ends with the text it started with records nothing.cancel()restores the initial text and records nothing — Escape in one call.textproperty while a session is open, so the glyphs under the caret are always the stored text.Obtain via
TextClip.beginTextEdit(). A session must be finished with exactly one ofcommit()orcancel(); beginning a new session on the same clip cancels an unfinished one, and destroying the clip cancels it too.