[WordPress] 外掛分享: ACE HTML Block

首頁外掛目錄 › ACE HTML Block
50+
安裝啟用
★★★★★
5/5 分(2 則評價)
2597 天前
最後更新
問題解決
WordPress 5.0+ PHP 5.2.4+ v1.0.1 上架:2019-02-05

內容簡介

此外掛註冊了一個使用 ACE 編輯器的原始 HTML 區塊,功能包括語法高亮顯示、行號、縮排和 HTML 驗證。

您區塊中包含的任何 HTML 標記都將像核心「自訂 HTML」區塊一樣在用戶頁面或文章中解釋和渲染。此外掛不適用於在前端網站中嵌入美觀的標記,而是針對那些需要在頁面或文章中包含原始 HTML 並希望改善其 HTML 片段的可讀性以及提升在瀏覽器中的程式碼編輯體驗的開發人員。

使用方法:

在後台編輯器中創建新區塊,並在格式選項中查找「ACE HTML 區塊」。它有一個心形圖示。

關於區塊轉換的注意事項:

希望在未來 WordPress 核心「自訂 HTML」區塊中引入原生語法高亮顯示功能。此區塊已配置為轉換為(以及從)核心 HTML 區塊,因此如果您想要禁用它,轉換回核心區塊將很容易。要轉換此區塊,請單擊區塊左上角的心形圖示,然後從下拉菜單中選擇「自訂 HTML」。

致謝:

底層使用react-ace 。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「ACE HTML Block」→ 直接安裝(推薦)

原文外掛簡介

Registers a raw html block which uses the ACE Editor. Features include syntax highligting, line numbers, indentation, and HTML validation.
Any HTML markup included in your block will be interpreted and rendered on your user-facing page or post just like the core “Custom HTML” block. This plugin is not for embedding pretty markup on your front-end site, rather it is for those developers that need to include raw HTML in their pages or posts and want to improve the readability of their HTML snippets and have a better in-browser code editing experience.
To Use:
Create a new block in the editor and look for “ACE HTML Block” in the Formatting section. It has a heart icon.
Note on block transforms:
There (hopefully) may come a time in the future when WordPress introduces native syntax highlighting on core “Custom HTML” blocks. This block is configured to transform to (and from) the core HTML block so the transition away from this plugin will be easy if you ever want to disable it. To transform this block click on the heart icon in the upper left corner of the block and select “Custom HTML” from the dropdown menu.
Thanks:
Under the hood it uses react-ace.

延伸相關外掛

文章
Filter
Mastodon