2
我嘗試了下面的代碼,但它只是向第一個.wmd-input
添加了pagedown按鈕。如何在一個頁面中使用多個pagedown?
if ($(".wmd-input").length > 0) {
var converter = new Markdown.Converter();
var help = function() { alert("Do you need help?"); }
var options = {
helpButton: { handler: help },
strings: {quoteexample: "whatever you're quoting, put it right here"}
};
var editors = [];
var i = 0;
$(".wmd-input").each(function() {
editors[i] = new Markdown.Editor(converter, "", options);
editors[i].run();
i = i + 1;
});
}
你應該把溶液作爲自己回答,然後接受它(而不是編輯的問題)。請參閱:http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ – Carpetsmoker 2014-12-02 15:27:39
好的,我會這樣做的。 – kastelli 2014-12-02 15:50:10