evCreate API 5.7 Help

Text Items

The Text subsection of the Object section of the evCreate API includes enumerations, interfaces, and functions to create and update text items and to manage text formatting.

text namespace

The Text subsection of the Object evCreate API section is accessed with the text namespace inside the object namespace:

evCreate.object.text.Function()

Enumerations

EvHTextAlignment

An enumeration of options for horizontal text alignment (justification).

EvVTextAlignment

An enumeration of options for vertical text alignment.

Interfaces

EvCharSpan

An interface that specifies a continuous range of characters in a text.

EvFontStyle

An interface that specifies the font, color, and formatting of a text.

EvTextAlignment

An interface that specifies the horizontal and vertical alignment of a text.

EvTextAttributes

An interface that defines the text content and formatting of a given text item.

Functions

ClearFormatting(obj: EvItem, span?: EvCharSpan): Promise<void>

A function to restore the default text formatting of the characters specified by a given continuous range in a given text item.

Create(text: string, bounds: EvRect, zOrder?: EvObjectZOrder, font?: EvFontStyle, withMarkdown?: boolean): Promise<EvItem>

A function to create a new text item prepopulated with given content and formatting within a given fixed bounding box.

CreateAt(text: string, at: EvCoord2D, width?: number, zOrder?: EvObjectZOrder, font?: EvFontStyle, withMarkdown?: boolean): Promise<EvItem>

A function to create a new text item prepopulated with given content and formatting within a dynamic bounding box at a given position.

GetTextAttributes(obj: EvItem, span?: EvCharSpan): Promise<EvTextAttributes>

A function to get the text content and formatting of the characters specified by a given continuous range in a given text item.

RemoveHyperlinks(obj: EvItem, span?: EvCharSpan): Promise<void>

A function to remove hyperlinks from the characters specified by a given continuous range in a given text item.

SetAlignment(obj: EvItem, alignment: EvTextAlignment, span?: EvCharSpan): Promise<void>

A function to apply a given new text alignment to the characters specified by a given continuous range in a given text item.

SetFont(obj: EvItem, font: EvFontStyle, span?: EvCharSpan): Promise<void>

A function to apply a given new text formatting to the characters specified by a given continuous range in a given text item.

SetHyperlink(obj: EvItem, link: EvHyperlink, span?: EvCharSpan): Promise<void>

A function to attach a given hyperlink to the characters specified by a given continuous range in a given text item.

SetText(obj: EvItem, text: string, span?: EvCharSpan, withMarkdown?: boolean): Promise<void>

A function to replace the characters specified by a given continuous range in a given text item with given new text and Markdown formatting.

17 April 2025