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); } }