RobinBrouwer WMD - 阅读基本 jQuery
我是 jQuery 新手(说实话,我使用它只是因为 这个 WMD 编辑器需要它) 。
不管怎样,我正在查看 jQuery 代码(转到上面的链接并查看 jquery.wmd.js),并且有选项默认值:
WMDEditor.defaults = { // {{{
version: 2.0,
output_format:"markdown",
lineLength:40,
button_bar: "wmd-button-bar",
preview: "wmd-preview",
output: "wmd-output",
input: "wmd-input",
...
这让我相信有一种方法可以将选项作为参数传递给函数。我正在寻找一种传递 helpLink
选项的方法。我确信它真的很简单,就像facepalm 一样简单,但我看不懂 jQuery,也没有文档。有人可以告诉我如何传递选项参数吗
$(function() {
$(".wmd-input").wmd();
});
I'm new to jQuery (and truth be told I am only using it because this WMD editor requires it).
Anyway, I am looking at the jQuery code (go to the above link and view jquery.wmd.js) and there are option defaults:
WMDEditor.defaults = { // {{{
version: 2.0,
output_format:"markdown",
lineLength:40,
button_bar: "wmd-button-bar",
preview: "wmd-preview",
output: "wmd-output",
input: "wmd-input",
...
Which leads me to believe that there is a way to pass on the options as arguments to the function. I am looking for a way to pass on the helpLink
option. I am sure it is really easy, like facepalm easy, but I can't read jQuery and there is no documentation. Can someone show me how to pass on option arguments to this
$(function() {
$(".wmd-input").wmd();
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果插件设置正常,你可以这样做:
If the plugin is setup normally you can do this: