evCreate API 5.7 Help

Create Function

Creates a new text item prepopulated with given content and formatting within a given fixed bounding box in an Envision document currently opened in the Canvas Envision Creator app.

Create( text: string, bounds: [[[EvRect|evrect-interface.html]]], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]], font?: [[[EvFontStyle|evfontstyle-interface.html]]], withMarkdown?: boolean ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

text: string

A string, the text that should be contained in the new text item.

bounds: EvRect

An EvRect object, the position and size of the bounding box of the new text item. The dimensions of the bounding box are fixed regardless of the size of the given text content.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

  • The layer item object of a layer in the current document where the new text item should be added. The default value is the current layer on the current page.

  • The position of the new text item in the stack of object items on the given layer. It is a zero-based index that is 0 for the topmost object item on the layer and increases by 1 for each following object item going down the stack. The default value is 0.

font?: EvFontStyle

An EvFontStyle object, a custom text formatting that should be applied to the text contained in the new text item.

If Markdown formatting is included in the given text, it is applied to this text after the custom text formatting has been applied.

withMarkdown?: boolean

A Boolean, a flag to indicate whether the given text includes (true) or does not include (false) Markdown formatting.

The default value is false.

Return value

Promise<EvItem>

A Promise that, if fulfilled, resolves to an Object item object of the new text item successfully created within the fixed bounding box in the current document.

16 April 2025