TMarkdown

API Manual

TMarkdown is a text formatter that produces html content from plain text. The formatter follows the Markdown syntax and the GFM (GitHub Flavored Markdown) extension.

Any content in the body of TMarkdown, including both static text and the rendering results of its child controls, is first converted using the Markdown syntax. Then, to any code block found in the html, syntax highlighting is applied. The code being highlighted follows the syntax of the specified Language, which can be 'php' (default), 'prado', 'css', 'html', etc. Here, 'prado' stands for the syntax of PRADO control templates. If the language is not specified in the Language property, it can be evinced from the Markdown syntax.

If line numbers are desired in front of each line, set ShowLineNumbers to true.

To use TMarkdown, simply enclose the contents to be formatted within the body of a TMarkdown control. The following example formats some text and piece of PHP code,

<com:TMarkdown ShowLineNumbers="true" >
PRADO Markdown Test
===================

Some text and a list:
* item 1
* item 2

Now, some code:

```php
public function test() {
  // comment
  echo "look me i'm colorful";
}
```
</com:TMarkdown>