views:

22

answers:

1

Take it easy on me, guys. I have no idea what I'm doing.

I cloned the Git repository for the OpenLibrary/WMD fork based on my research that led me to this question.

I opened the wmd-test.html file in my browser, thinking it would be a full working example of the WMD editor in action. But all I see are two textareas, which don't appear to do anything when I type into them (I was expecting a live preview). I tried this page in Firefox 3.6.8, Chrome 6, and IE 9 (beta).

Would anybody care to steer this poor, clueless developer in the right direction? What am I missing?

I'm including the html file in its entirety here, as it isn't long.

<!DOCTYPE html>

<html>
    <head>
        <title>Test WMD Page</title>

        <link rel="stylesheet" type="text/css" href="wmd.css" />

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
        <script type="text/javascript" src="jquery.wmd.min.js"></script>
    </head>

    <body>
        <div style="width: 500px;">
            <textarea id="xwmd-input" rows="5" style="width: 100%"></textarea>
        </div>

        <div style="width: 500px;">
            <textarea id="ywmd-input" rows="5" style="width: 100%"></textarea>
        </div>

        <script type="text/javascript">
        $().ready(function() {
            $("textarea").wmd({
                "preview": true,
                "helpLink": "http://daringfireball.net/projects/markdown/",
                "helpHoverTitle": "Markdown Help",
            });
        });
        </script>
    </body>
</html>
A: 

Try removing the extra comma after "Markdwon Help":

    <script type="text/javascript"> 
    $().ready(function() { 
        $("textarea").wmd({ 
            "preview": true, 
            "helpLink": "http://daringfireball.net/projects/markdown/", 
            "helpHoverTitle": "Markdown Help", 
        }); 
    }); 

It should be:

            "helpHoverTitle": "Markdown Help"
WPCoder