Box id, unique within the document while content editing is active.
data is replaced with the Worker's latest data by ContentEditManager after every operation.
Latest box data from the Worker, refreshed after every operation.
Page number (1-based) of the box.
Optionalmanager: ContentEditManagerOptionaldocViewer: DocumentViewerMoves the box one step backward in the stacking order.
Moves the box one step forward in the stacking order.
Moves the box to the back of the stacking order.
Stacking order (names follow AnnotationManager.bringToFront / bringToBack): bring to front, forward one, send to back, backward one. Each move of an image box is one history entry. Note: stacking moves of text boxes cannot be undone (the engine records undo only for bring-to-front and only when it actually moves, not the other three, so the step counts would not match; text boxes are never recorded).
Clear characters independently of block multi-selection; active editor collapses at its caret.
Rectangle (page coordinates) and type.
Returns a snapshot of the box.
Id, page number, type and rectangle (page coordinates); text boxes also include their full text.
Returns the editor open on this box while it is being edited.
The text or image editor, or null when the box is not being edited.
Synchronous selection read from the authoritative Worker text model, never the reading selection.
Current character range in this text block, including an inactive block. Detached snapshot.
Index after the last selected character.
Index of the first selected character.
Geometry for the character selection captured at call time, including an inactive block. Detached native layout snapshot; null when no character range is retained. This read does not open an editor, alter selection, or apply tool safe distances.
Checks whether an editor is open on the box.
true while the box is being edited.
Set a rectangle in unrotated page coordinates (pt), with one content undo entry. visible (default): move/resize the visible bounds, retaining image crop proportions. frame: set the complete image/text frame, as the native SetFrame primitive does. clip: for a cropped image use SetClipRect; otherwise use SetFrame. This preserves the distinction between an image's frame and clip placement without exposing handles. Programmatic coordinates are not clamped to tool safe distances.
Optionaloptions: { mode?: "visible" | "frame" | "clip" }
Optionalmode?: "visible" | "frame" | "clip"How the rectangle is applied: 'visible' (default), 'frame' or 'clip' (image boxes only).
Select characters without opening a keyboard editor or changing the selected boxes.
Optionalend: numberOpens an editor on the box (stopping editing of other boxes first); fires contentBoxEditStarted.
Optionalinput: ContentBoxInputCommits the changes in the editor and closes it; fires contentBoxEditEnded.
Optionaloptions: { preserveSelection?: boolean }
OptionalpreserveSelection?: booleanKeeps the box's text selection after editing stops. Defaults to false.
An image box shown while editing page content. Its editor is ContentImageBoxEditor.