hackmdio / hackmd-io-issues

Reporting issues about HackMD Enterprise Edition and HackMD.io
35 stars 7 forks source link

code block copy to clipboard button #171

Open cellcoresystems opened 4 years ago

cellcoresystems commented 4 years ago

Is your feature request related to a problem? Please describe. I really would love to have a copy to clipboard button on every code block on the upper right/left corner.

Describe the solution you'd like For example :o) prismjs - copy to clipbord clipboardjs -smaller lightweight

Describe alternatives you've considered From clipboardjs.com A browser extension that adds a "copy to clipboard" button to every code block on GitHub, MDN, Gist, StackOverflow, StackExchange, npm, and even Medium.

Install for Chrome and Firefox.

wft44maqb commented 3 years ago

ping?

joshlopes commented 1 year ago

ping?

tlambert03 commented 6 months ago

ping?

AndrewHess commented 3 months ago

Please add this soon. Or at least a way to manually enable it for certain code blocks

planetoid commented 2 weeks ago

參考別人的 user script 改了一版。

安裝方法:

  1. 瀏覽器安裝 Tampermonkey (篡改猴) 擴充套件 https://www.tampermonkey.net/
  2. 前往與安裝 HackMD Copy Code Snippet https://greasyfork.org/zh-TW/scripts/506037-hackmd-copy-code-snippet

已知 bug:如果在編輯模式,新增的程式碼區塊不會有 Copy 按鈕,需要重新載入網頁才會出現。