Skip to content

Function: MessageBody()

Call Signature

ts
function MessageBody(options: MessageBodyProps): Block;

Defined in: src/renderer/blocks/index.ts:2027

Experimental

MessageBody — content wrapper for a Message. Renders the content string as GitHub-flavored markdown by default; drop arbitrary blocks (CodeBlock, Snippet, Sources, …) as children to compose richer bodies.

Parameters

ParameterType
optionsMessageBodyProps

Returns

Block

Example

ts
MessageBody({content: '**Hello** _world_'});
MessageBody({}, [CodeBlock({code: 'console.log(1)', language: 'js'})]);

Call Signature

ts
function MessageBody(options: MessageBodyProps, content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:2028

Experimental

MessageBody — content wrapper for a Message. Renders the content string as GitHub-flavored markdown by default; drop arbitrary blocks (CodeBlock, Snippet, Sources, …) as children to compose richer bodies.

Parameters

ParameterType
optionsMessageBodyProps
contentChildBlock[]

Returns

Block

Example

ts
MessageBody({content: '**Hello** _world_'});
MessageBody({}, [CodeBlock({code: 'console.log(1)', language: 'js'})]);

Call Signature

ts
function MessageBody(content: ChildBlock[]): Block;

Defined in: src/renderer/blocks/index.ts:2032

Experimental

MessageBody — content wrapper for a Message. Renders the content string as GitHub-flavored markdown by default; drop arbitrary blocks (CodeBlock, Snippet, Sources, …) as children to compose richer bodies.

Parameters

ParameterType
contentChildBlock[]

Returns

Block

Example

ts
MessageBody({content: '**Hello** _world_'});
MessageBody({}, [CodeBlock({code: 'console.log(1)', language: 'js'})]);

Matterway Assistant SDK Documentation