Reference TMarkDownStyle
Declared in Codebot.Render.Widgets.Custom.pas on line 119
TMarkDownLabel is a label which draws its text as markdown. Set MaxWidth to wrap the text to a width, which is then the width of the label. Without a MaxWidth each paragraph is one line. The height of the label fits the text.
These parts of markdown are drawn:
# Heading, ## Heading, ### Heading (and deeper levels)
Paragraphs, which are separated by blank lines. Lines next to each other
are joined. End a line with two spaces or a backslash to break it.
**bold**, __bold__, *italic*, _italic_, ***bold italic***, `code`
[links](url), drawn underlined
- bullets, * bullets, + bullets, and 1. numbered lists, indented two
spaces for each level
> block quotes
``` fenced code blocks ```
--- horizontal rules
\ escapes the next character
Paragraphs, which are separated by blank lines. Lines next to each other
are joined. End a line with two spaces or a backslash to break it.
**bold**, __bold__, *italic*, _italic_, ***bold italic***, `code`
[links](url), drawn underlined
- bullets, * bullets, + bullets, and 1. numbered lists, indented two
spaces for each level
> block quotes
``` fenced code blocks ```
--- horizontal rules
\ escapes the next character
A line holding only {left 240x180} reserves a rectangle which is
drawn by OnDrawRect. The name tells the handler what to draw, and the size
is in the units of the label. A left or right rectangle floats at that
side, and paragraphs, headings, and lists flow around it. A center
rectangle sits on its own between the blocks around it, which is also
where a float goes when the label has no MaxWidth or the float would leave
too little room for text. Code blocks, quotes, and rules start below any
floats, and a line holding only {clear} does the same for what follows.
drawn by OnDrawRect. The name tells the handler what to draw, and the size
is in the units of the label. A left or right rectangle floats at that
side, and paragraphs, headings, and lists flow around it. A center
rectangle sits on its own between the blocks around it, which is also
where a float goes when the label has no MaxWidth or the float would leave
too little room for text. Code blocks, quotes, and rules start below any
floats, and a line holding only {clear} does the same for what follows.
The text uses the NotoSans fonts and DejaVuSansMono from the fonts folder
of the render context assets. A font which can not be loaded is replaced
by the theme font. FontSize is the size of plain text, and when it is zero
the size of the theme font is used.
of the render context assets. A font which can not be loaded is replaced
by the theme font. FontSize is the size of plain text, and when it is zero
the size of the theme font is used.
TMarkDownStyle = (mdRegular, mdBold, mdItalic, mdBoldItalic, mdCode);