Live Image API
Insert and inspect document images
Choose how the image participates in the document, insert a local file, and then select any image in the editor to inspect its live properties.
Select an imageClick an image in the document to inspect and format it.
Selected image
Image
Inline
Text position -
Rendered size-
Scale-
Text position-
Alignment-
Images in this document
0 images
Reading the image collection...
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Images are document objects, not HTML decoration
TX Text Control stores images as part of the Word-compatible document. Their placement, scale, text flow, accessibility metadata, and anchor position travel with the document when it is saved.
Image collection
TXTextControl.images
Insertion
ImageCollection.addInline / addAnchored
Image geometry
Image.getSize / getHorizontalScaling
Accessibility
FrameBase.getDescriptiveText / setDescriptiveText
How it works
A browser FileReader reads the selected file as a data URL. After removing the MIME prefix, the script passes the Base64 payload to either ImageCollection.addInline or ImageCollection.addAnchored. No separate upload endpoint is needed.
An inline image uses ImageInsertionMode.AsCharacter: it occupies a text position and follows the surrounding characters during editing. An anchored image is connected to a paragraph and uses ImageInsertionMode.DisplaceText, allowing document text to flow around the object.
The imageSelected and imageDeselected events keep the inspector synchronized with the editor. The selected Image inherits position, alignment, and descriptive-text members from FrameBase, while image-specific scaling is exposed by getHorizontalScaling, setHorizontalScaling, and their vertical counterparts.
ImageCollection.forEach enumerates the objects in the current text part. The collection overview is therefore generated from the loaded document instead of being hard-coded in the page.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0