textareaにidを指定する必要があるPagedownを使用しwmd-input
ます。それは次のように書かれていますMarkdown.Editor.js
:
function PanelCollection(postfix) {
this.buttonBar = doc.getElementById("wmd-button-bar" + postfix);
this.preview = doc.getElementById("wmd-preview" + postfix);
this.input = doc.getElementById("wmd-input" + postfix);
};
ただし、textareasのIDが異なるプロジェクトのさまざまな場所でエディターを使用する必要があります。したがって、id属性の代わりにclassを使用すると便利です。どうすればこれを達成できますか?