Open Zilong-Li opened 3 years ago
Hey Zilong,
Good suggestion, let me see how easy it will be for a pure css solution.
Hi,
I don't think there is a good solution to copy text to clipboard with one click button for pure css, although I am not an expert on css. Alternatively, maybe we can make the code block copiable when moving mouse to the block using hover feature so that people can Ctrl/Cmd+C
to copy. check this https://stackoverflow.com/questions/44418687/making-text-selectable-on-hover-with-css. But this is not good solution for mobile device. I think using js is inevitable if you want to make it work across all devices.
Hi @gongzhitaao
Thanks for your great work on this.
I wonder if you can add a copy button for code block so that people can copy the code snippets quickly, especially for long and large blocks.