Skip to main content
The AST (mdast Root) is the canonical representation. All conversions go through the AST: Platform Format <-> AST <-> Markdown String Adapters implement this interface to convert between their platform-specific format and the standard AST.

Methods

extractPlainText()

Extract plain text from platform format. Convenience method - default implementation uses toAst + toPlainText.

Parameters

string
required

Returns

string

fromAst()

Render an AST to the platform’s native format. This is the primary method used when sending messages.

Parameters

required

Returns

string

toAst()

Parse platform’s native format into an AST. This is the primary method used when receiving messages.

Parameters

string
required

Returns

Root