Markdown

Prose supports emoji shortcodes. A shortcode in a code span or a fenced block stays as written.

API

Interface

func Markdown(c *tgframe.Container, markdown string, conf ...*MarkdownConf)

Parameters

  • c: Parent container.
  • markdown: Markdown content to display.
  • conf: Optional configuration, at most one.
// MarkdownConf is the configuration for the Markdown component.
type MarkdownConf struct {
	tgframe.Base // ID
}

Example

tgcomp.Markdown(c, "* Hello, World!")
tgcomp.Markdown(c, "* Hello, World!", &tgcomp.MarkdownConf{ID: "my_markdown"})