Set of simplified examples for markdown and code highlighting markdow highlighting mathjax equations math script src https cdnjs cloudflare com ajax libs showdown 1 7 2 showdown min js script link rel stylesheet href https cdnjs cloudflare com ajax libs highlight js 9 12 0 styles atom one light min css script src https cdnjs cloudflare com ajax libs highlight js 9 12 0 highlight min js script script src https cdnjs cloudflare com ajax libs highlight js 9 4 0 languages go min js script script src https cdnjs cloudflare com ajax libs highlight js 9 4 0 languages xml min js script script id MathJax script src https cdn jsdelivr net npm mathjax 3 es5 tex chtml js script textarea id content Title Once upon a abc def ghi for let i 0 i 100 i print counter i end for mathbf v_1 x y z An example of mardown to html with code highlighting e g let and int i 2 Cats and bats textarea script document body style height 300pt var textNode document getElementById content var text textNode value text text replaceAll text text replaceAll text text replaceAll text text replaceAll converter new showdown Converter tables true disableForced4SpacesIndentedSublists true simpleLineBreaks true var html converter makeHtml text textNode parentNode removeChild textNode var div document createElement div div id content document body appendChild div div innerHTML html hljs initHighlightingOnLoad setTimeout MathJax typesetClear MathJax typeset console log fix math 10 script script src https cdnjs cloudflare com ajax libs showdown 1 7 2 showdown min js script link rel stylesheet href cdnjs cloudflare com ajax libs highlight js 9 11 0 styles default min css script src https cdnjs cloudflare com ajax libs highlight js 9 11 0 highlight min js script style highlight inline code blocks differently they do not have the pre not pre code font family Consolas Lucida Console Monaco monospace background ffffdd border radius 3px style textarea id content Title Once upon a abc def ghi for let i 0 i 100 i print counter i end for An example of mardown to html with code highlighting e g let and int i 2 textarea script document body style height 300pt var text document getElementById content converter new showdown Converter tables true disableForced4SpacesIndentedSublists true simpleLineBreaks true var html converter makeHtml text value text parentNode removeChild text var div document createElement div div id content document body appendChild div div innerHTML html hljs initHighlightingOnLoad console log div innerHTML script
document createElement div div id content document body appendChild div div innerHTML html hljs initHighlightingOnLoad setTimeout MathJax typesetClear MathJax typeset console log fix math 10 script script src https cdnjs cloudflare com ajax libs showdown 1 7 2 showdown min js script link rel stylesheet href cdnjs cloudflare com ajax libs highlight js 9 11 0 styles default min css script src https cdnjs cloudflare com ajax libs highlight js 9 11 0 highlight min js script style highlight inline code blocks differently they do not have the pre not pre code font family Consolas Lucida Console Monaco monospace background ffffdd border radius 3px style textarea id content Title Once upon a abc def ghi for let i 0 i 100 i print counter i end for An example of mardown to html with code highlighting e g let and int i 2 textarea script document body style height 300pt var text document getElementById content converter new showdown Converter tables true disableForced4SpacesIndentedSublists true simpleLineBreaks true var html converter makeHtml text value text parentNode removeChild text var div document createElement div div id content document body appendChild div div innerHTML html hljs initHighlightingOnLoad console log div innerHTML script