CsTextContent.markdown constructor

CsTextContent.markdown(
  1. String source, {
  2. Key? key,
  3. ValueChanged<String>? onFollowLink,
})

Builds blocks from a Markdown subset: # to ##### headings, paragraphs (separated by blank lines), -/* and 1. lists (indent two spaces to nest), fenced code blocks, lines starting with <small> for small print, and inline **bold**, *italic*, `code` and [text](target) links. Following a link calls onFollowLink with its target.

Implementation

factory CsTextContent.markdown(String source, {Key? key, ValueChanged<String>? onFollowLink}) => CsTextContent(
  key: key,
  blocks: parseCsMarkdown(source, onFollowLink: onFollowLink),
);