Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は jHtmlArea を使用しており、spanタグ内のテキストをラップするカスタム ボタンを作成する必要があります。ツールバーにボタンを配置する方法を理解できましたが、選択したテキストを取得して変更し、その jHtmlArea iframe に戻すために何をしなければならないか理解できません。
span
誰かが助けることができれば、私は感謝します。
ありがとうございます
たとえば、これを使用しました:
{ css: "float-left", text: "Pull left", action: function(btn) { var s = this.getSelectedHTML(); s = "<span style='/*some css rules*/'>" + s + "</span>"; this.pasteHTML(s); } }