HeaderBlock

init

Creates an HeaderBlock instance.

NameTypeRequiredDefaultDescription

text

string

true

The text of the header. Maximum length of 150 characters.

callback

function

false

null

An optional callback to configure the new HeaderBlock.

Return: The HeaderBlock instance.

id

Sets a custom identifier for the HeaderBlock instance.

NameTypeRequiredDefaultDescription

id

string

true

The custom identifier for the HeaderBlock instance.

Return: The HeaderBlock instance.

getMemento

Converts the HeaderBlock instance to a serializable format.

NameTypeRequiredDefaultDescription

No arguments

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

{
    "type": "header",
    "text": {
        "type": "plain_text",
        "text": "My Header"
    },
    "block_id": "optional"
}

Last updated