Class \Prado\Web\UI\WebControls\TMarkdown
TMarkdown is a control that produces HTML from code with markdown syntax.
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML). Further documentation regarding Markdown can be found at http://daringfireball.net/projects/markdown/
To use TMarkdown, simply enclose the content to be rendered within the body of TMarkdown in a template.
See https://daringfireball.net/projects/markdown/basics for details on the Markdown syntax usage.
TMarkdown also performs syntax highlighting for code blocks whose language is recognized by TTextHighlighter. The language of a code block must be specified in the first line of the block and enclosed within a pair of square brackets (e.g. [php]).
Class hierarchy
- \Prado\Web\UI\WebControls\TMarkdown
- \Prado\Web\UI\WebControls\TTextHighlighter
- \Prado\Web\UI\WebControls\TTextProcessor
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0.1
public
|
processText(string $text) : string
Processes a text string.
This method is required by the parent class. |
protected
|
highlightCode(array<string|int, mixed> $matches) : string
Highlights source code using TTextHighlighter
|