Title: Code Syntax Highlighting Block
Author: hbgl
Published: <strong>2025 年 6 月 11 日</strong>
Last modified: 2026 年 5 月 23 日

---

搜索插件

![](https://ps.w.org/code-syntax-highlighting-block/assets/banner-772x250.png?rev
=3310012)

![](https://ps.w.org/code-syntax-highlighting-block/assets/icon.svg?rev=3310016)

# Code Syntax Highlighting Block

 作者：[hbgl](https://profiles.wordpress.org/hbgl/)

[下载](https://downloads.wordpress.org/plugin/code-syntax-highlighting-block.1.1.3.zip)

 * [详情](https://cn.wordpress.org/plugins/code-syntax-highlighting-block/#description)
 * [评价](https://cn.wordpress.org/plugins/code-syntax-highlighting-block/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/code-syntax-highlighting-block/#developers)

 [支持](https://wordpress.org/support/plugin/code-syntax-highlighting-block/)

## 描述

A WordPress plugin that provides a Gutenberg block for displaying computer source
code with syntax-highlighting. Uses [highlight.js](https://highlightjs.org/) under
the hood.

 * ✅ Supports 192 languages
 * ✅ 256 included themes
 * ✅ Server rendered static HTML
 * ✅ Zero JS runtime dependencies
 * ✅ Dynamic light/dark mode based on [preferred color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)

## 屏幕截图

 * [[
 * A demo of syntax-highlighted PHP code.
 * [[
 * A demo of editing the block in the Gutenberg editor.

## 区块

该插件提供了 1 个区块.

 *   Code with Syntax Highlighting Display computer code with syntax highlighting.

## 常见问题

### Why no line numbers?

[Because highlight.js does not have them.](https://highlightjs.readthedocs.io/en/latest/line-numbers.html)

## 评价

此插件暂无评价。

## 贡献者及开发者

「Code Syntax Highlighting Block」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ hbgl ](https://profiles.wordpress.org/hbgl/)

[帮助将「Code Syntax Highlighting Block」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/code-syntax-highlighting-block)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/code-syntax-highlighting-block/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/code-syntax-highlighting-block/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/code-syntax-highlighting-block/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/code-syntax-highlighting-block/)。

## 更新日志

#### 1.1.3

 * Updated internal dependencies

#### 1.1.2

 * Updated Codemirror code editor in Gutenberg to latest version
 * Updated internal dependencies

#### 1.1.1

 * Added option for setting global default line height

#### 1.1.0

 * Added better code editor

#### 1.0.0

 * Release

## 额外信息

 *  版本 **1.1.3**
 *  最后更新：**2 周前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 6.7 或更高版本 **
 *  已测试的最高版本为 **7.0**
 *  PHP 版本 ** 8.1 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/code-syntax-highlighting-block/)
 * 标签
 * [code](https://cn.wordpress.org/plugins/tags/code/)[syntax highlighting](https://cn.wordpress.org/plugins/tags/syntax-highlighting/)
 *  [高级视图](https://cn.wordpress.org/plugins/code-syntax-highlighting-block/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/code-syntax-highlighting-block/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/code-syntax-highlighting-block/reviews/)

## 贡献者

 *   [ hbgl ](https://profiles.wordpress.org/hbgl/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/code-syntax-highlighting-block/)