from nbmail.compose import block_text
# Simple text
block = block_text("Hello world")
print(1+1)
# Markdown text
block = block_text("This is **bold** and this is *italic*")
# Centered text
block = block_text("Centered content", align="center")2
Create a block of text (supports Markdown).
text : strPlain text or Markdown. Markdown will be converted to HTML.
align : Literal['left', 'center', 'right', 'justify'] = 'left'Text alignment. Default is "left".
: BlockA block containing the formatted text.