Message content
Structure text, attachments, and location shares in a message.
Every message has "content" which specifies the information in the message. This could be some formatted text, a file attachment, or a shared location.
See the conceptual documentation for message content to learn more about how TalkJS represents message content.
Conforms to: Codable, Equatable, Sendable
The content of a message is structured as a list of content blocks.
No properties or methods are currently defined.
Conforms to: ContentBlock, SendContentBlock
A block of formatted text in a message’s content.
Full documentation of each TextNode variant
Conforms to: Entity
A node in a TextBlock that renders its children with a specific style.
The kind of formatting to apply when rendering the children
- type: "bold" is used when users type *text* and is rendered with HTML <strong>
- type: "italic" is used when users type _text_ and is rendered with HTML <em>
- type: "strikethrough" is used when users type ~text~ and is rendered with HTML <s>
Conforms to: Entity
A node in a TextBlock that adds indentation for a bullet-point list around its children (HTML <ul>).
Conforms to: Entity
A node in a TextBlock that renders its children with a bullet-point (HTML <li>).
Conforms to: Clickable
A node in a TextBlock that renders its children as a clickable link (HTML <a>).
Inherited from Clickable.children.
The URL to open when the node is clicked.
Conforms to: Leaf
A node in a TextBlock that renders text as a link (HTML <a>).
The text to display in the link.
The URL to open when a user clicks this node.
Conforms to: Clickable
A node in a TextBlock that renders its children as a clickable action link which triggers a custom action.
The name of the custom action to invoke when the link is clicked.
Inherited from Clickable.children.
The parameters to pass to the custom action when the link is clicked.
Conforms to: Clickable
A node in a TextBlock that renders its children as a clickable action button which triggers a custom action.
The name of the custom action to invoke when the button is clicked.
Inherited from Clickable.children.
The parameters to pass to the custom action when the button is clicked.
Conforms to: Leaf
A node in a TextBlock that renders text in an inline code span (HTML <code>).
Inherited from Leaf.text.
Conforms to: Leaf
A node in a TextBlock that is used for custom emoji.
The name (including colons at the start and end) of the custom emoji to show.
Conforms to: Leaf
A node in a TextBlock that is used when a user is mentioned.
The ID of the user who is mentioned.
The name of the user who is mentioned.
Conforms to: ContentBlock
No properties or methods are currently defined.
Full documentation of each FileBlock variant
Conforms to: FileBlock
The most basic FileBlock variant, used whenever there is no additional metadata for a file.
The name of the file, including file extension
An encoded identifier for this file. Use in SendFileBlock to send this file in another message.
The size of the file in bytes
The URL where you can fetch the file
Conforms to: FileBlock
A FileBlock variant for a video attachment, with additional video-specific metadata.
The duration of the video in seconds, if known.
The name of the video file, including file extension.
An encoded identifier for this file. Use in SendFileBlock to send this video in another message.
The height of the video in pixels, if known.
The size of the file in bytes.
The URL where you can fetch the file.
The width of the video in pixels, if known.
Conforms to: FileBlock
A FileBlock variant for an image attachment, with additional image-specific metadata.
The name of the image file, including file extension.
An encoded identifier for this file. Use in SendFileBlock to send this image in another message.
The height of the image in pixels, if known.
The size of the file in bytes.
The URL where you can fetch the file.
The width of the image in pixels, if known.
Conforms to: FileBlock
A FileBlock variant for an audio attachment, with additional audio-specific metadata.
The duration of the audio in seconds, if known
The name of the audio file, including file extension
An encoded identifier for this file. Use in SendFileBlock to send this file in another message.
The size of the file in bytes
The URL where you can fetch the file
Conforms to: FileBlock
A FileBlock variant for a voice recording attachment, with additional voice-recording-specific metadata.
The duration of the voice recording in seconds, if known
The name of the file, including file extension
An encoded identifier for this file. Use in SendFileBlock to send this voice recording in another message.
The size of the file in bytes
The URL where you can fetch the file
Conforms to: ContentBlock, SendContentBlock
A block showing a location in the world, typically because a user shared their location in the chat.
The north-south coordinate of the location.
Usually listed first in a pair of coordinates.
Must be a number between -90 and 90
The east-west coordinate of the location.
Usually listed second in a pair of coordinates.
Must be a number between -180 and 180
Conforms to: Codable, Equatable, Sendable
The version of ContentBlock that is used when sending or editing messages.
No properties or methods are currently defined.
Conforms to: SendContentBlock
The version of FileBlock that is used when sending or editing messages.
The encoded identifier for the file, obtained by uploading a file with Session/sendFile, or taken from another message.