
內容簡介
總結:這個 WordPress 外掛會在 Gutenberg Code Block 中新增複製至剪貼簿的功能,並在區塊右上角加入一個複製按鈕,點擊後可以選取文字、複製至剪貼簿,並取消選取的文字,此外,此外掛會使用兩個 JavaScript 函式庫:Clipboard.js 和 Prism.js。
問題與答案:
<ul>
<li>這個 WordPress 外掛會為哪個區塊新增功能?</li>
<ul>
<li>答案:Gutenberg Code Block。</li>
</ul>
<li>新增了什麼功能?</li>
<ul>
<li>答案:複製至剪貼簿的功能。</li>
</ul>
<li>在哪個位置新增複製按鈕?</li>
<ul>
<li>答案:在區塊的右上角。</li>
</ul>
<li>在按下複製按鈕後,會執行哪些動作?</li>
<ul>
<li>答案:選取文字、複製至剪貼簿並取消已選取的文字。</li>
</ul>
<li>需要使用哪兩個 JavaScript 函式庫?</li>
<ul>
<li>答案:Clipboard.js 和 Prism.js。</li>
</ul>
</ul>
外掛標籤
開發者團隊
原文外掛簡介
This plugin will add a new copy to clipboard functionality to Gutenberg Code Block.
It will add a copy button at the top right corner of the block. After clicked, it will select the text, copy to clipboard, and after copy it will deselect the copied text. No markup here.
This plugin makes use of two javascript libraries:
Clipboard.js and Prism.js
