Add Copy Button to Blogger Blockquote

As mentioned last time , I went back to the approach of using blockquote to display code. Well, it's still inconvenient without a copy button.

Blogger/blogspot 给blockquote代码段添加复制按钮

上回书说到 , 我还是回到了用blockquote显示代码的方案. 那么, 没有复制按钮还是不方便呀.

Why I Use Blockquote Instead of Code Highlighting

Besides Google's  code-prettify , I've also tried Prism and highlight.js Prism

Blogger/blogspot 最适合我的 还是不用代码高亮 / code-prettify / Prism / highlight.js

除了 google 的  code-prettify , 其实我也尝试过 Prism 和 highlight.js Prism

Add Copy Button to Code Blocks in Blogspot

Previously we implemented adding highlighting to code blocks. https://zelikk.blogspot.com/2024/05/blogspot-code-prettify.html However, if a line is too long, it ends up looking like this. Using the mouse to drag and select is very inconvenient. It would be great if there were a copy button at this point. I always thought it was complicated before. Since I have the motivation again today, let's look into it.

Blogger/blogspot 给代码段添加复制按钮

之前我们实现了给代码段添加高亮. https://zelikk.blogspot.com/2024/05/blogspot-code-prettify.html 但是如果一行太长, 就会这样. 用鼠标拖着去选择, 很不方便. 这时候如果有个复制按钮就好了. 之前一直以为很复杂. 今天既然又有冲动了, 就查一查吧.