Slack Block Kit
Use rich-text blocks for structured messages. The batch keeps lists, quotations and code in their native Slack shapes wherever possible.
Result
The first rich_text block contains a bold “Ship” followed by “ today”. Supply the Slack channel and send each part with its text fallback for notifications and screen readers.
Code examples
TypeScript
import { toMessages } from "mdto-messages";
const batch = toMessages("**Ship** today", "slack");
console.log(batch.messages);Python
from mdto_messages import to_messages
batch = to_messages("**Ship** today", "slack")
print(batch.messages)Go
package main
import (
"fmt"
"log"
"github.com/jmeinke/mdto-messages"
)
func main() {
batch, err := mdto.ToMessages("**Ship** today", mdto.Slack)
if err != nil {
log.Fatal(err)
}
fmt.Println(batch.Messages)
}Format a draft for the Slack composer