Markdown
Native Markdown Support for BoxLang
Last updated
Was this helpful?
Was this helpful?
markdown( "# Hello World" )<h1>Hello World</h1>HtmlToMarkdown( markup )HtmlToMarkdown( "<h1>Hello World</h1>" )# Hello World// The content of the component will be parsed and stored in the variable: data.
bx:markdown variable="data"{
writeOutput( "## Hola" )
}bx:markdown{
writeOutput( "## Hola" )
}<bx:markdown variable="html">
## Hola Mundo
My beautiful markdown text
</bx:markdown>
<bx:output>#html#</bx:output><bx:markdown>
## Hola mundo
This is a markdown test
</bx:markdown>"modules" : {
"cbmarkdown" : {
"enabled" : true,
"settings" : {
// Looks for www or emails and converts them to links
"autoLinkUrls" : true,
// Creates anchor links for headings
"anchorLinks" : true,
// Set the anchor id
"anchorSetId" : true,
// Set the anchor id but also the name
"achorSetName" : true,
// Do we create the anchor for the full header or just before it. True is wrap, false is just create anchor tag
"anchorWrapText" : false,
// The class(es) to apply to the anchor
"anchorClass" : "anchor",
// raw html prefix. Added before heading text, wrapped or unwrapped
"anchorPrefix" : "",
// raw html suffix. Added before heading text, wrapped or unwrapped
"anchorSuffix" : "",
// Enable youtube embedded link transformer
"enableYouTubeTransformer" : false,
// default null, custom inline code open HTML
"codeStyleHTMLOpen" : "<code>",
// default null, custom inline code close HTML
"codeStyleHTMLClose" : "</code>",
// default "language-", prefix used for generating the <code> class for a fenced code block, only used if info is not empty and language is not defined in
"fencedCodeLanguageClassPrefix" : "language-",
// Table options
"tableOptions" : {
// Treat consecutive pipes at the end of a column as defining spanning column.
"columnSpans" : true,
// Whether table body columns should be at least the number or header columns.
"appendMissingColumns" : true,
// Whether to discard body columns that are beyond what is defined in the header
"discardExtraColumns" : true,
// Class name to use on tables
"className" : "table",
// When true only tables whose header lines contain the same number of columns as the separator line will be recognized
"headerSeparationColumnMatch" : true
}
}
}
// end markdown config
};