[WordPress] 外掛分享: Shawn Code Highlighter

首頁 › 外掛目錄 › Shawn Code Highlighter
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 6.2+ PHP 7.4+ v1.2.1 上架:2026-11-28

外掛標籤

開發者團隊

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

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

原文外掛簡介

Shawn Code Highlighter brings back syntax highlighting for code that lost it: SyntaxHighlighter blocks left behind after that plugin was removed, pre blocks imported from another platform, and plain pre blocks with no language hint. It works on the rendered page only, so stored post content is never rewritten.
Code is shown in a dark palette inspired by Xcode’s default dark editor theme. This plugin is not affiliated with or endorsed by Apple.
Supported markup:

SyntaxHighlighter blocks (wp:syntaxhighlighter/code), using the language saved in the block.
pre > code with language-*, lang-* or brush:* classes.
Migrated pre.source-code blocks.
CodeMirror-exported blocks (div.cm-line per line) and pre blocks that use
for line breaks.
Plain pre blocks, using constrained language auto-detection.

Long lines wrap inside the code block instead of forcing a horizontal scrollbar.
Assets load only on single posts that contain a pre element or a SyntaxHighlighter block. There are no settings, no tracking and no external requests: all files are bundled with the plugin.
The plugin highlights code inside the post content area of block themes (.wp-block-post-content) and classic themes (.entry-content).
Third-party software
This plugin bundles Highlight.js 11.12.0, distributed under the BSD 3-Clause License (see assets/vendor/LICENSE).

Source code: https://github.com/highlightjs/highlight.js
The bundled highlight.min.js is the unmodified minified release file.
The color theme (assets/xcode-dark.css) is original to this plugin and licensed GPLv2 or later.

延伸相關外掛

文章
Filter
Mastodon