[WordPress] 外掛分享: Light Code Block

首頁外掛目錄 › Light Code Block
WordPress 外掛 Light Code Block 的封面圖片
全新外掛
安裝啟用
尚無評分
106 天前
最後更新
問題解決
WordPress 6.0+ v1.0.2 上架:2025-06-16

內容簡介

### 摘要:
外掛"Light Code Block"是一個在文章和頁面中插入和顯示程式碼片段的簡單又輕量級解決方案。它透過在TinyMCE(經典)編輯器中添加自定義“LC”按鈕或在古騰堡編輯器中添加程式碼區塊來運作。插入的程式碼將以整潔易讀的格式顯示在前端。

### 問題與答案:
1. "Light Code Block"外掛的功能是什麼?
- 簡單且輕量級解決方案,用於在文章和頁面中插入和顯示程式碼片段。
2. 如何在TinyMCE(經典)編輯器中使用這個外掛?
- 安裝並啟用外掛後,在文章或頁面編輯畫面中,點擊工具列中的“LC”按鈕,接著在彈出窗口中貼上或輸入程式碼,最後按下確定即可。
3. 插入的程式碼會以什麼方式顯示在前端?
- 插入的程式碼將保存在一個特殊區塊內並以<pre>標籤顯示在前端,類別為mce-simple-code-block。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Light Code Block」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The “Light Code Block” plugin is a simple and lightweight solution for inserting and displaying code snippets in posts and pages.
It works by adding a custom “LC” button to the TinyMCE (Classic) editor or a code block in the Gutenberg editor.
The inserted code will be shown on the front end in a clean, readable format.
Usage

Install and activate the plugin.
Go to the post or page edit screen.
In the TinyMCE (Classic) editor, click the “LC” button in the toolbar.
In the popup window that opens, paste or write your code, and click OK.
Save or update your post.

The code will be saved inside a special block and displayed on the front end within a

 tag with the class mce-simple-code-block (i.e., 
...

).
To insert code using the Gutenberg editor, you first need to add a Classic (TinyMCE) block, and then use it to insert your code.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon