前言介紹
- 這款 WordPress 外掛「APH Prism Syntax Highlighter」是 2016-08-11 上架。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2023-02-14,距離現在已有 809 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 有 7 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
agusph |
外掛標籤
prism | syntax | highlighter | syntax highlighter |
內容簡介
Prism 是一個最受歡迎的語法高亮工具,被許多博客或網站廣泛使用,其中一些知名網站包括 Mozilla、Drupal 和 SitePoint。
為什麼許多網站偏好使用這個高亮工具的原因之一是它能夠建立自訂的語言高亮和插件,你可以自行決定要使用哪些功能。
這個外掛程式可以輕鬆地將這個代碼高亮工具引入你的 WordPress 網站中,並且配備許多功能和使用者友好的 GUI,讓它簡便易用。
** 功能 **
簡單易用
支援經典編輯器和 Guttenberg 區塊編輯器
Prism 提供的所有可能的語法語言
完整的 GUI,不需要硬編碼參數
易於建立自訂版本。輕鬆選擇你自己的語言、佈景主題和一些插件
自訂容器最大高度。在顯示長代碼時很有用
易於添加自定義 CSS。對於響應式設計很有用
易於編輯在 tinyMCE 文本編輯器中編寫的代碼(截圖 4)
原地編寫和編輯代碼。代碼編輯器的文字區域支援標籤和反向標籤,因此你可以直接編輯或編寫你的代碼,而無需切換到代碼編輯器。
按需加載腳本。僅在需要時加載 Prism 高亮工具的 JavaScript 和 CSS 文件
能夠覆蓋全局選項,使用每個代碼區塊的個別選項
支援 TinyMCE 可視模式和文本模式(快速標籤),它也支援在管理員評論頁面上使用的快速標籤(截圖 5)
使用與 APH Syntax Highlighter 和 Crayon Syntax Highlighter 外掛程式相似的模式,因此你的代碼在使用這些外掛程式時仍然可以正常運作
新增語言:淺色和深色純文字
使用方式
安裝了外掛程式後,前往管理設定 > Prism Highlighter 設置全局設置,包括你想要加載的高亮語言、主題等等。
在 TinyMCE 菜單(新增或編輯文章或頁面)中,將出現一個新的按鈕可用於彈出代碼編輯器,只需複製粘貼代碼並填入一些選項即可。
這個新按鈕還可以在管理員編輯評論頁面的快速標籤中找到。當你編輯或回覆評論時,這個快速標籤會出現。
原文外掛簡介
Prism is one of the most popular syntax highlighters that widely used by a lot of blog or websites, some of them are popular websites, such as Mozilla, drupal, and SitePoint.
One reason why a lot of websites prefer to use this highlighter is because it’s ability to do custom builds of the language highlighter and plugins you want to be used
This plugin helps you to do all of those tasks and bring this code highlighter to your WordPress easily, provided with many features and user-friendly GUI, make it handy and easy to use.
** Features. **
Simple and easy to use
Support both Classic and Guttenberg block editor
All possible syntax languages provided by Prism
Full GUI, don’t need to hardcode parameters
Easy to make a custom build. Choose your own language, theme, and some plugins easily
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 4)
Write and Edit code in place. The textarea of code editor, support 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 file of prism highlighter only when needed
Ability to override global options and use individual options for each code block
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 Syntax Highlighter and Crayon Syntax Highlighter plugins, so your code will still work using those plugins
Language added: Light plain and dark plain
How To Use
After installing the plugin, go to the admin setting Settings > Prism 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.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「APH Prism Syntax Highlighter」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 1.2 | 1.3 | 1.1.1 | 1.2.1 | 1.2.2 | 1.3.1 | 1.4.0 | 1.4.1 | 1.5.0 | 1.5.1 | 1.5.2 | trunk |
延伸相關外掛(你可能也想知道)
String locator 》當你在開發主題和外掛時,你經常會注意到某些文字被硬編碼在文件中,你需要對其進行修改,但你不知道該主題或外掛的名稱,更不知道要查找哪個文件。, 你可以...。
Highlighting Code Block 》「Highlighting Code Block」外掛可讓你以一個點擊的方式添加一個有語法突顯的程式碼區塊。, 它支援「區塊編輯器」和「傳統編輯器」。, (不過,我們建議在「...。
Crayon Syntax Highlighter 》一款支援自訂語言和佈景主題的 PHP 和 jQuery 語法突顯外掛。, 它可以從 URL 或 WordPress 文章的文字中進行突顯。Crayon 讓管理語言檔案和使用正則表達式定...。
Code Block Pro – Beautiful Syntax Highlighting 》展示你美麗的程式碼,不僅僅是顯示它!這個版塊外掛提供編輯程式碼塊的功能,直接運行你的程式碼,使用與受歡迎的 VS Code 編輯器相同的渲染引擎。此外掛提供...。
WP-Syntax 》WP-Syntax 提供乾淨的語法突顯,使用 GeSHi,支援多種流行的語言,包括有或沒有行號的語法突顯,可以在從瀏覽器中複製程式碼片段時保持格式。, 它通過運行早...。
Urvanov Syntax Highlighter 》guage files, and there are many available on the plugin's website. The Urvanov Syntax Highlighter block is recommended for new posts instead of the...。
Prismatic 》唯一的 3 合 1 語法高亮插件!, 使用 Prism.js、Highlight.js 或純文字轉義顯示美麗的程式碼片段:, , Prism.js – 使用 Prism.js 轉義和語法高亮, Highlight....。
CodeColorer 》CodeColorer 是一個外掛程式,它可以讓您在文章中插入代碼片段並添加漂亮的語法高亮效果。, 此外掛程式基於 GeSHi庫建立,支援大多數語言。CodeColorer 的各...。
Code Click to Copy 》這是一個簡單的外掛程式,當點擊
和
標籤內容時,會自動複製到剪貼簿中。其他的外掛也有提供相同的功能,但需要點擊 [COPY] 按鈕進...。
Pastacode 》使用 Pastacode,您可以輕鬆地將代碼加入您的文章中,並使用宏偉的 PrismJs 着色庫。, 您可以將源代碼插入到文章編輯器中,直接將其寫入編輯器中(使用 Guten...。
WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages 》• 現場示範, • 亮點:, , 支援259種程式語言。, 適用於行動裝置:無需執行JavaScript,與基於JavaScript的解決方案相比可節省頻寬和電力。, 後端負載接近零。...。
Simple Code Highlighter 》簡易程式碼高亮外掛, 程式碼高亮外掛使用 Google Code Prettify Script 來標示您的程式碼。您不需要程式設計技能來使用它。只需按下編輯器工具列上的按鈕並貼...。
WP SyntaxHighlighter 》這個外掛是一個基於Alex Gorbatchev的SyntaxHighlighter ver. 3.0.83和2.1.382的程式碼語法加亮工具。, 功能特點, , 基於Alex Gorbatchev的"SyntaxHighl...。
Better File Editor 》增加了行號、語法高亮、代碼折疊等功能,並且在 WordPress 的管理面板中的佈景主題和外掛程式編輯器中提供更多功能。, 此外掛程式使用 Ajax.org Cloud9 Edito...。
WP-SynHighlight 》此外掛提供在貼文和評論中的語法突顯功能。, , , 完整的 GUI 模式。不需要像其他外掛一樣在編輯器中切換到程式碼模式再切回來。, 具備即時語法突顯支援的 GUI...。