evCreate API 5.7 Help

GetTextAttributes Function

Returns the text content and formatting of the characters given as a continuous range in a given text item from an Envision document currently opened in the Canvas Envision Creator app.

GetTextAttributes(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], span?: [[[EvCharSpan|evcharspan-interface.html]]]): Promise<[[[EvTextAttributes|evtextattributes-interface.html]]]>

Parameters

obj: EvItem

An Object item object, a text item from the Envision document currently opened in the Canvas Envision Creator app with the given range of characters that should be retrieved with their text formatting.

If a given object item is not a text, the function throws an error.

span?: EvCharSpan

An EvCharSpan object, a given continuous range of characters in the given text item that should be retrieved with their text formatting.

The default value is the entire text in the given text item.

Return value

Promise<EvTextAttributes>

A Promise that, if fulfilled, resolves to an EvTextAttributes object with the text content and formatting of the characters within the given range in the given text item in the current document.

17 April 2025