[WordPress] 外掛分享: Syntax

首頁外掛目錄 › Syntax
10+
安裝啟用
尚無評分
3228 天前
最後更新
問題解決
WordPress 4.7.0+ v0.9.2 上架:2017-05-14

內容簡介

Syntax WordPress 外掛改善了在 WordPress 編輯器中插入和顯示程式碼範例的過程。

在 WordPress 編輯器中保留程式碼的格式可以是一個挑戰。這是因為 WordPress 在編輯器內篩選內容,這可能會改變程式碼的內容和/或格式。Syntax 插件添加了一個按鈕到編輯器,允許以保留語法的方式添加程式碼。這樣做是正確的(不使用簡碼),因此即使您在未來禁用 Syntax 插件,您的程式碼仍將在文章和頁面內以語意正確的標籤中包含。

該插件通過在編輯器中保存每個程式碼範例以及由插件創建的元字段來運作。每當 WordPress 執行可能修改程式碼範例的篩選器時,該範例就從元字段中複製回編輯器。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.9.2) 或搜尋安裝

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

原文外掛簡介

The Syntax WordPress plugin improves the process of inserting and displaying code examples within the WordPress editor.
Preserving the formatting of code within the WordPress editor can be a challenge. This is because WordPress filters content within the editor, which can change the content and/or formatting of the code. The Syntax plugin adds a button to the editor that allows code to be added in a way that preserves the syntax. This is done properly (without the use of shortcodes) so that even if you disable the Syntax plugin in the future, your code will still be wrapped in the semantically correct tags within your posts and pages.
The plugin works by saving each code example both within the editor and in a meta field created by the plugin. Whenever WordPress runs a filter with the potential to modify the code example, the example is copied from the meta field back into the editor.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon