MarkdownToHtml()
Transforms Markdown formatted String into HTML.
Introduced: 6.0.0.150
MarkdownToHtml( string=string, safeMode=boolean, encoding=string );
Returns: String
| Argument | Description | Default |
|---|---|---|
|
string
string,
required
|
edit
A Markdown formatted string or a path to a file containf a markdown formatted string to convert to HTML Alias: markdown |
|
|
safeMode
boolean,
optional
|
edit
If set to true it does escape unsafe HTML tags Alias: safe |
false |
|
encoding
string,
optional
|
edit
Charset, only used in case the argument markdown contains a file path Alias: charset |
Examples
editnl= chr(10);
dNL= nl & nl;
markdownString="" &
"## Heading1" & dNL &
"###### Simple Paragraph" & dNL &
"Some simple paragraph with a simple text" & dNL &
"###### Ordered List" & dNL &
"- First item" & nl &
"- Second item" & nl &
"- Third item" & dNL &
"###### Some Blockquotes" & dNL &
"> This is some blockquoted text" & nl &
">> Blockquoted text with indentation" & dNL;
echo( markdownToHtml( markdownString) );
See also
- Strings
- string.MarkdownToHTML()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)