The Markdown or HTML content to be converted.
default=true - If true, converts Markdown to HTML. If false, converts HTML to Markdown.
The resulting HTML string.
const markdown = "# Header\n\nThis is **bold** and *italic* text.\n\n* List item 1\n* List item 2";
const html = convertMarkdownToHTML(markdown);
console.log(html);
// Output:
// <h1>Header</h1>
// <p>This is <strong>bold</strong> and <em>italic</em> text.</p>
// <ul><li>List item 1</li><li>List item 2</li></ul>
Converts Markdown text to HTML. It handles the following Markdown elements: