
內容簡介
「Highlighting Code Block」外掛可讓你以一個點擊的方式添加一個有語法突顯的程式碼區塊。
它支援「區塊編輯器」和「傳統編輯器」。
(不過,我們建議在「區塊編輯器」中使用它。)
請查看此頁面以獲取本外掛的詳細介紹。(日文文章)
如何使用(對於區塊編輯器)
打開 Block Inserter 的「格式」分類。
有一個名為「Highlighing Code Block」的自定義區塊。
選擇它,區塊就會被插入。
選擇代碼的語言,並輸入任何代碼。
如何使用(對於傳統編輯器)
你應該會在工具列上看到一個標記為「Code Block」的選擇框(預設是第二行)。
當你從選擇框中選擇一種語言時,就會插入一個代碼塊(pre 標籤)。
如果它不能使用
本外掛僅支援 PHP 5.6或更高版本,WordPress 5.6或更高版本。
請檢查您的 PHP 版本或 WordPress 版本。
關於設置
「[HCB] 設置」選單應該要添加到管理畫面左邊的「設置」中。
此外掛的相關設置在此菜單中設置。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
“Highlighting Code Block” allows you to add a syntax-highlighted code block with just a click.
It supports both “Block Editor” and “Classic Editor”.
(However, we recommend using it in the “Block Editor”.)
Please see the following page for a detailed explanation of this plugin.
URL: https://loos.co.jp/en/documents/highlighting-code-block/
Source code
The source code of this plugin is available on Github.
URL: https://github.com/ddryo/Highlighting-Code-Block
How to use
How to use (For Block Editor)
Open the “Formatting” category of the Block Inserter.
There is a custom block named “Highlighing Code Block”.
Select it, the block will be inserted.
Select the language of the code and enter any code.
How to use (For Classic Editor)
You should see a select box labeled “Code Block” on the toolbar (2nd row by default).
When you select a language from the select box, a code block (pre tag) is inserted.
If it doesn’t work
This plugin works only with PHP version 5.6 or later, WordPress 5.6 or later.
Please check your PHP version or WordPress version.
About settings
The menu “[HCB] Settings” should be added to “Settings” in the left menu of the management screen.
Settings related to this plugin are set in this menu.
