HeaderBlock

init

Creates an HeaderBlock instance.

Name
Type
Required
Default
Description

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.

Name
Type
Required
Default
Description

id

string

true

The custom identifier for the HeaderBlock instance.

Return: The HeaderBlock instance.

getMemento

Converts the HeaderBlock instance to a serializable format.

Name
Type
Required
Default
Description

No arguments

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

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

Last updated