这个大规模杀伤性武器的例子缺少什么?
伙计们,对我放松一点。我不知道我在做什么。
我根据我的研究克隆了 OpenLibrary/WMD 分支的 Git 存储库,这些研究使我这个问题。
我在浏览器中打开了 wmd-test.html 文件,认为这将是 WMD 编辑器的完整工作示例。但我看到的只是两个文本区域,当我输入它们时,它们似乎没有执行任何操作(我期待实时预览)。我在 Firefox 3.6.8、Chrome 6 和 IE 9(测试版)中尝试了此页面。
有人愿意引导这个可怜的、无知的开发人员走向正确的方向吗?我缺少什么?
我在这里包含了整个 html 文件,因为它并不长。
<!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"></script>
<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>
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"></script>
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试删除“Markdwon Help”后面多余的逗号:
它应该是:
Try removing the extra comma after "Markdwon Help":
It should be: