[WordPress] 外掛分享: WP Prism Syntax Highlighter

前言介紹

  • 這款 WordPress 外掛「WP Prism Syntax Highlighter」是 2014-08-28 上架。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2014-09-07,距離現在已有 3891 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

guitek |

外掛標籤

prism | syntax | prismjs | Highlight | highlighter |

內容簡介

WP Prism Syntax Highlighter 讓你可以在 WordPress 博客中使用 Prism,這是由 Lea Verou 開發的一款輕量、可擴展的語法高亮插件。

它在 WordPress 編輯器工具欄中集成了一個簡單方便的代碼編輯器,讓你可以輕鬆地插入代碼。
不需要任何配置,但你仍然可以在插件的設置頁面中自定義默認設置。

它支持所有 Prism 功能,包括:

語法高亮(30多種語言)
自定義主題(6個官方主題)
插件(7個官方插件:行高亮、行號、顯示不可見字符、自動連結、WebPlatform文檔、文件高亮、顯示語言)

註:插件存檔包含

所有語言定義
無插件
默認主題

為了使插件更小巧,建議僅使用你需要的部分。請在以下位置下載你的自定義 Prism 並上傳文件:

your_plugin_directory/wp-prism-syntax-highlighter/css/
your_plugin_directory/wp-prism-syntax-highlighter/js/
請勿替換原始的 prism.css 和 prism.js,因為更新插件時它們將被覆蓋並且你所有的更改都會遺失!

幫助
想知道如何安裝插件?請訪問安裝頁面。
想了解插件的運作方式?點擊上述截圖。
有任何問題?請看常見問題解答。

貢獻
Prism 和這個插件都在自由時間下按照 MIT 許可協議進行開發。任何幫助,甚至是一個問題報告,我們都非常感謝!
貢獻途徑:

Prism: https://github.com/LeaVerou/prism
插件:https://github.com/GuiTeK/wp-prism-syntax-highlighter

為什麼需要另一個 Prism 插件?
如果你在插件目錄中搜索,你肯定會注意到有幾個用於 WordPress 的 Prism 插件。但是這些都不能滿足我的需要:一個插件沒有代碼編輯器,另一個不能轉義 HTML 標記,還有其他沒有我需要的選項...因此,我製作了一款新的插件滿足我的需求。

原文外掛簡介

WP Prism Syntax Highlighter enables you to use Prism by Lea Verou in your WordPress blog.

Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.

It has an easy and convenient code editor integrated into the WordPress editor toolbar: you can insert code in just one click.
It requires no configuration at all, however you can still customize the default settings in the plugin’s settings page.

It supports all Prism features, namely:

Syntax highlighting (30+ languages)
Custom themes (6 official themes)
Plugins (7 official plugins: Line Highlight, Line Numbers, Show Invisibles, Autolinker, WebPlatform Docs, File Highlight, Show Language)

NOTE: the plugin archive contains

all languages definitions
no plugin
default theme

It is recommended to use only what you need in order to keep the plugin the smallest possible.
Please download your custom Prism from http://prismjs.com/download.html and upload the files in:

your_plugin_directory/wp-prism-syntax-highlighter/css/
your_plugin_directory/wp-prism-syntax-highlighter/js/
Do NOT replace the original prism.css and prism.js, you will lose all your changes as they get overwritten when updating the plugin!

Help
Wondering how to install the plugin? Visit the Installation page.
Want to see the plugin in action? Click Screenshot above.
Got any question? See the FAQ.
Contribute
Both Prism and this plugin are distributed under the MIT license and are developed during our free time. Any help, even a bug report, is much appreciated!
To contribute:

Prism: https://github.com/LeaVerou/prism
Plugin: https://github.com/GuiTeK/wp-prism-syntax-highlighter

Why another Prism plugin?
If you searched the plugin directory, you certainly noticed that there are several Prism plugins for WordPress. Well, none of them satisfied me: one plugin had no code editor, the other didn’t escape HTML tags, another didn’t have the options I needed… so I made a new one to suit my needs.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Prism Syntax Highlighter」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | trunk |

延伸相關外掛(你可能也想知道)

  • Prism Syntax Highlighter for WordPress 》儘管 WordPress 上已經有兩款外掛可用,但我決定從頭自己寫一個。結果是一個極簡但功能強大的外掛,只有大約 250 行 PHP 代碼。, , 支援 Prism 的所有可能配...。
  • WP PrismJS – Syntax Highlighter 》使用 WP PrismJS,輕鬆為 WordPress 上的程式碼添加語法高亮。, 只需下載和啟用外掛,然後 TinyMCE 編輯器上就會出現一個新圖示。點擊它,就可以輸入您的縮排...。
  • WP HyperMD 》WP HyperMD是一個漂亮又實用的在線Markdown文檔編輯器。, 該外掛在HyperMD的基礎上提供了對WordPress平台的支持。, 使用WordPress Jetpack 的Markdown模塊來...。
  • Codeblocks Extended with PrismJS 》Codeblocks Extended with PrismJS 是為了個人需求而誕生的輕量化程式碼高亮外掛,具有特殊的功能。, 許多其他基於 PrismJS 的外掛在存儲庫中既過時,又缺乏...。

文章
Filter
Apply Filters
Mastodon