The following example shows how you can convert Markdown to HTML at runtime using JavaScript and the PageDown Markdown-to-HTML converter library.

Ext JS Example (using Ext.Ajax):

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Converting Markdown files to HTML using JavaScript</title>
    <link rel="stylesheet" href="http://cdn.sencha.io/try/extjs/4.0.7/resources/css/ext-all.css"/>
</head>
<body>
 
    <div id="readme"></div>
 
    <script src="http://cdn.sencha.io/try/extjs/4.0.7/ext-all.js"></script>
    <script src="Markdown.Converter.js"></script>
    <script type="text/javascript">
        Ext.onReady(function () {
            var converter = new Markdown.Converter(),
                /* Alias the conversion method to make it easier to swap libraries in the future. */
                markdownToHtml = converter.makeHtml;
 
            Ext.Ajax.request({
                url: 'readme.md',
                success: function(res){
                    Ext.fly('readme').update(markdownToHtml(res.responseText));
                }
            });
        });
    </script>
 
</body>
</html>

Ext JS Example (using Ext.Element.load()):

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Converting Markdown files to HTML using JavaScript</title>
    <link rel="stylesheet" href="http://cdn.sencha.io/try/extjs/4.0.7/resources/css/ext-all.css"/>
</head>
<body>
 
    <div id="readme"></div>
 
    <script src="http://cdn.sencha.io/try/extjs/4.0.7/ext-all.js"></script>
    <script src="Markdown.Converter.js"></script>
    <script type="text/javascript">
        Ext.onReady(function () {
            var converter = new Markdown.Converter(),
                /* Alias the conversion method to make it easier to swap libraries in the future. */
                markdownToHtml = converter.makeHtml;
 
            Ext.fly("readme").load({
                "url": "readme.md",
                "renderer": function (ldr, res, req) {
                    ldr.getTarget().update(markdownToHtml(res.responseText));
                }
            });
        });
    </script>
 
</body>
</html>

jQuery Example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Converting Markdown files to HTML using JavaScript</title>
</head>
<body>
 
    <div id="readme"></div>
 
    <script src="http://code.jquery.com/jquery.min.js"></script>
    <script src="Markdown.Converter.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function jQueryReady($) {
            var converter = new Markdown.Converter(),
                /* Alias the conversion method to make it easier to swap libraries in the future. */
                markdownToHtml = converter.makeHtml;
 
            $.get("readme.md").success(function (data) {
                $("#readme").html(markdownToHtml(data));
            });
        });
    </script>
 
</body>
</html>