hackmd-io-issues
hackmd-io-issues copied to clipboard
code block copy to clipboard button
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.
ping?
ping?
ping?
Please add this soon. Or at least a way to manually enable it for certain code blocks
參考別人的 user script 改了一版。
安裝方法:
- 瀏覽器安裝 Tampermonkey (篡改猴) 擴充套件 https://www.tampermonkey.net/
- 前往與安裝 HackMD Copy Code Snippet https://greasyfork.org/zh-TW/scripts/506037-hackmd-copy-code-snippet
已知 bug:如果在編輯模式,新增的程式碼區塊不會有 Copy 按鈕,需要重新載入網頁才會出現。