Docly Developers
Function Updated 20 May 2026

markdown(text)

Converts Markdown-formatted text to HTML.

Parameters

textstringrequired

The Markdown-formatted text to convert to HTML.

Returns

String containing the HTML representation of the input Markdown.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
    // Convert Markdown to HTML
    let md = "# Hello World\n\nThis is **bold** and *italic*.\n\n- Item 1\n- Item 2\n- Item 3";

    let html = docly.markdown(md);
    write(html);
}#