[WordPress] 外掛分享: APH Syntax Highlighter

首頁外掛目錄 › APH Syntax Highlighter
WordPress 外掛 APH Syntax Highlighter 的封面圖片
10+
安裝啟用
尚無評分
3253 天前
最後更新
問題解決
WordPress 3.5+ v1.2.2 上架:2016-08-20

內容簡介

Syntax Highlighter 是由 Alex Gorbatchev 開發的語法高亮外掛程式,已經開發了十年以上,是一個相當受歡迎的語法高亮外掛程式,也被許多部落格和網站廣泛使用。

目前已經發佈了 4 版本,其建置方法與先前版本有顯著的變化,讓一些使用者感到有些混淆和難以執行。

此外掛程式可協助您輕鬆將此程式碼高亮器帶到 WordPress 中,讓您不用煩惱建置。此外掛程式提供許多功能和使用者友好的 GUI,讓使用起來更加方便和容易。

** 功能 **

簡單易用
完整的 GUI,無需進行硬編碼參數
自訂容器最大高度。當顯示長程式碼時,此功能非常有用。
輕鬆加入自訂 CSS,有助於響應式設計。
編輯在 tinyMCE 文字編輯器中編寫的程式碼非常簡單(請參閱螢幕擷圖 3)
就地編輯程式碼。文字編輯區支援 Tab 和 Back Tab,您可以直接編輯或撰寫程式碼,而無需切換回程式碼編輯器。
按需載入腳本,僅在需要時載入語法高亮器的 JavaScript 和 CSS 檔案。
使用 Alex Gorbatchev 的 Syntax Highlighter 4
能夠覆蓋全局選項並使用每個程式碼塊的個別選項
自訂字型大小
支援 TinyMCE 視覺模式和文本模式(快速標籤),同時還支援管理員評論頁面中使用的快速標籤(請參閱螢幕擷圖 5)
採用類似於 APH Prism Highlighter 和 Crayon Syntax Highlighter 的模式,因此您的程式碼仍然可以使用這些外掛程式
支援語言:深色平面(控制臺風格)和淺色平面

使用方法

安裝此外掛程式後,到管理員設定「設定 > 語法高亮器」來配置全局設定,包括您想要載入的語法高亮器語言、主題等等…

在 TinyMCE 菜單(新增或編輯文章或頁面)中,有一個新按鈕可用於彈出程式碼編輯器,只需複製並貼上您的程式碼,然後填入一些選項。

此新按鈕也可以在管理員編輯評論頁面中的快速標籤中找到。當您編輯或回覆評論時,此快速標籤會出現。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Syntax Highlighter developed by Alex Gorbatchev that has been developed 10+ years is a popular syntax highlighter. It is also widely used by a lot of blog and website.
Currently, it achieves version of 4, this version has significant change in the built method compared to the previous, this is, for some people, somewhat confused and hard to do.
This plugin helps you to bring this code highlighter to your WordPress easily, forget a headache builds. Provided with many features and user-friendly GUI, make it handy and easy to use
** Features. **

Simple and easy to use
Full GUI, don’t need to hardcode the parameters
Custom container max-height. Useful when displaying long code.
Easy to add custom CSS. Useful for responsive design.
Easy to edit code that has been written in tinyMCE text editor (Screenshot 3)
Write and edit code in place. The textarea code editor supports the tab and back tab, so you can directly edit or write your code, rather than switch back to your code editor.
Load script on demand, load javascript and CSS files of syntax highlighter only when needed.
Use Syntax Highlighter 4 by Alex Gorbatchev
Ability to override global options and use individual options for each code block
Custom Font Size
Support TinyMCE Visual mode and Text Mode (Quick Tags), it also supports the Quick tags used in the admin comment page (screenshot 5)
Use similar pattern with APH Prism Highlighter and Crayon Syntax Highlighter plugins, so your code will still work using those plugins
Language added: dark plain (console style) and light plain

How To Use
After installing the plugin, go to the admin setting Settings > Syntax Highlighter to configure the global setting including the highlighter languages you want to load, theme, etc…
In the TinyMCE menu (add or edit post or page), there is a new button that can be used to pop up the code editor, simply copy-paste your code and fill in some options
This new button also can be found at the quick tags of comment editor in the Admin Edit Comments page. This quick tag appears when you edit or reply a comment.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon