ContextBlock

init

Creates an ContextBlock instance.

Name
Type
Required
Default
Description

No arguments

Return: The ContextBlock instance.

id

Sets a custom identifier for the ContextBlock instance.

Name
Type
Required
Default
Description

id

string

true

The custom identifier for the ActionsBlock instance.

Return: The ContextBlock instance.

image

Adds an ImageElement to this ContextBlock instance.

ImageElementchevron-right
Name
Type
Required
Default
Description

imageUrl

string

true

The url for the image.

altText

string

false

"" (empty string)

The alt text for the image.

Return: The new ImageElement instance.

triangle-exclamation

text

Adds a TextObject to this ContextBlock instance.

TextObjectchevron-right
Name
Type
Required
Default
Description

text

string

true

The text for the TextObject.

Return: The new TextObject instance.

triangle-exclamation

getMemento

Converts the ContextBlock instance to a serializable format.

Name
Type
Required
Default
Description

No arguments

Return: (struct) A struct representing this ContextBlock instance.

triangle-exclamation

Last updated