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

首頁外掛目錄 › WP Prism Syntax Highlighter
30+
安裝啟用
★★★★★
5/5 分(2 則評價)
4211 天前
最後更新
問題解決
v1.0.5 上架:2014-08-28

內容簡介

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 標記,還有其他沒有我需要的選項...因此,我製作了一款新的插件滿足我的需求。

外掛標籤

開發者團隊

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

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

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon