addElementAtCursor

API reference for the addElementAtCursor method.

Add element to responsive documents, which slot things into a text stream

#elementobject
Required

Elements targeting a cursor are a subset of the base Element

An element that renders image content.

#altTextAltText
Optional

A description of the image content.

Properties of altText
#decorativeboolean
Optional

Indicates where the alternative text should be displayed.

  • If true, the alternative text will only be displayed in the editor.
  • If false, the alternative text will be displayed in the editor and in view-only mode.
#textstring
Required

The text content.

#typestring
Required

The type of element.

This must be "image".

#dataUrlstring
Optional

A data URL that contains the image data.

#refImageRef
Optional

A unique identifier that points to an image asset in Canva's backend.

Promise<void>