Title: DBlocks CodePro
Author: DPlugins
Published: <strong>2024 年 5 月 27 日</strong>
Last modified: 2026 年 4 月 3 日

---

搜索插件

![](https://ps.w.org/dblocks-codepro/assets/banner-772x250.png?rev=3092910)

![](https://ps.w.org/dblocks-codepro/assets/icon.svg?rev=3092910)

# DBlocks CodePro

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

[下载](https://downloads.wordpress.org/plugin/dblocks-codepro.1.5.1.zip)

[实时预览](https://cn.wordpress.org/plugins/dblocks-codepro/?preview=1)

 * [详情](https://cn.wordpress.org/plugins/dblocks-codepro/#description)
 * [评价](https://cn.wordpress.org/plugins/dblocks-codepro/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dblocks-codepro/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dblocks-codepro/#developers)

 [支持](https://wordpress.org/support/plugin/dblocks-codepro/)

## 描述

**Enhanced Code Editor for WordPress** transforms the default WordPress block editor
into a powerful development environment tailored for coding and content creation.
Built on the robust Monaco Editor, this plugin brings advanced code editing features
directly into WordPress, making it an essential tool for developers, designers, 
and content creators who frequently work with code.

### Key Features:

 * **Rich Code Editing**: Leverage the power of Monaco Editor, renowned for its 
   extensive capabilities including syntax highlighting, intelligent code completion,
   and seamless user experience.
 * **Emmet Integration**: Speed up your HTML/CSS workflow with built-in Emmet support,
   allowing you to use shorthand for rapid coding.
 * **Theme Customization**: Toggle between light and dark themes to suit your preference
   or match your working environment, enhancing visibility and reducing eye strain.
 * **Dynamic Syntax Highlighting**: Easily enable or disable syntax highlighting
   and choose between light or dark themes to best fit the context of your content.
 * **Flexible Editor Configuration**: Adjust font sizes and choose from various 
   programming languages such as HTML, CSS, JavaScript, PHP, and more, catering 
   to diverse development needs.
 * **Multiple Viewing Modes**: Includes ‘Code’, ‘Preview’, and ‘Split View’ modes,
   enabling you to code and preview content simultaneously or separately, optimizing
   your workflow.

### Ideal Use Cases:

This plugin is perfect for:

 * **Developers** embedding custom code directly into posts or pages.
 * **Educational platforms** that feature coding tutorials.
 * **Tech bloggers** showcasing programming tips and snippets.

### Why Choose Enhanced Code Editor?

 * **Improved Usability**: With an intuitive interface and adjustable settings, 
   this plugin is designed to enhance productivity and ease of use.
 * **Responsive and Adaptive**: Works seamlessly across different devices and screen
   sizes, ensuring a consistent editing experience everywhere.
 * **Persistent Settings**: Customizations and settings are saved per user, so your
   environment is the same each time you log in.

Embrace a superior coding experience within WordPress with **Enhanced Code Editor**.
Whether you’re a professional developer or a hobbyist, this plugin adapts to your
needs, making coding within WordPress a delight.

## 屏幕截图

[⌊Preview with Emmet Abbreviation⌉⌊Preview with Emmet Abbreviation⌉[

Preview with Emmet Abbreviation

[⌊Dark and Light Theme⌉⌊Dark and Light Theme⌉[

Dark and Light Theme

[⌊Split Preview⌉⌊Split Preview⌉[

Split Preview

[⌊Supported languages⌉⌊Supported languages⌉[

Supported languages

## 区块

该插件提供了 1 个区块.

 *   Code Pro HTML and Syntax Highlighter

## 安装

This section describes how to install the plugin and get it working.

e.g.

 1. Upload the plugin files to the `/wp-content/plugins/dblocks-codepro` directory,
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## 常见问题

### A question that someone might have

An answer to that question.

### What about foo bar?

Answer to foo bar dilemma.

## 评价

![](https://secure.gravatar.com/avatar/e235471c1e6d2b201ce55c659019e8d35e9c6b4f4c227589dc1e5261d0369209?
s=60&d=retro&r=g)

### 󠀁[Does what it claims to do, and does it well](https://wordpress.org/support/topic/does-what-it-claims-to-do-and-does-it-well/)󠁿

 [iamlegh](https://profiles.wordpress.org/iamlegh/) 2025 年 5 月 30 日

Well done Marco, this is a very useful block for developers who want to share code!

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/)

## 贡献者及开发者

「DBlocks CodePro」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ DPlugins ](https://profiles.wordpress.org/dplugins/)
 *   [ Marko Krstić ](https://profiles.wordpress.org/krstivoja/)

[帮助将「DBlocks CodePro」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dblocks-codepro)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.5.1

 * Fixed minimum WordPress version requirement (6.7+, not 7.0)

#### 1.5.0

 * Fixed AMD loader conflict that was breaking jQuery UI, TomSelect, and other plugins(
   EDD, datepicker, dialog, tooltip)
 * Updated Monaco Editor from 0.53.0 to 0.55.1
 * Fixed monaco.contribution.js defineProperty error
 * Requires WordPress 7.0+ (blocks v3 with mandatory iframe)
 * Removed non-iframe fallback code and classic editor detection
 * Simplified block registration using WP 7+ APIs
 * Consolidated all build scripts into single webpack config
 * Monaco Editor is now auto-copied via CopyWebpackPlugin on every build

#### 1.4.4

Forgot to update number ih plugin header …

#### 1.4.3

Hotfix – Will not load if Gutenberg is not loaded

#### 1.4.2

content change and added blueprint.json

#### 1.4.1

changed from wp_kses() to raw $content as wp_kres strips svg

#### 1.4.0

 * Added a Global Settings page
 * Added a Settings for Unused Plugins page (next to Disable Plugin)
 * Moved Global Settings from the sidebar to the Settings page
 * Split block into two variations: Custom HTML and Syntax Highlighting
 * Fixed template loading
 * Fixed loading in the v2 API when the editor is not in an iframe

#### 1.3.2

 * Added transfrom from HTML Block to CodePro Block

#### 1.3.1

 * Version Bump

#### 1.3.0

 * Added option to edit code outside of the block. That is perfect for small block
   sizes if you place code for a logo.
 * Added display language when using Syntax Highlighting. You can enable it from
   sidebar.
 * Added copy code button when using Syntax Highlighting. You can enable it from
   sidebar.
 * Topbar is simplified. If Highlighting is on you will see language switch if code
   is running and Highlighting is off you will see preview and split option.
 * Improved Monaco Editor performance and added loader.
 * Improved compatibility with WP 6.8.1

#### 1.2.9

 * Added option to enable/disable syntax highlighting inside toolbar
 * Added option to select language inside toolbar
 * Added option to select view mode as dropdown inside toolbar
 * Added tooltip for “Use Wrapper”
 * Added tooltip for “Activate Syntax Highlighting”
 * Updated paths for build script

#### 1.2.8

 * Updated yaml action

#### 1.2.7

 * Updated inspector controls to be compatible with WP 6.7.1. Fixed deprecation 
   warning.
 * Updated handling API if permalinks is set to ‘Plain’

#### 1.2.6

 * Fixed height of Monaco Editor. WP 6.7.1 added to make it 100vh by default. Now
   it is fit-content by default.
 * Updated monaco editor to the latest version 0.52.0. It was 0.48 before.

#### 1.2.5

 * Added option to scale Monaco Editor height with content
 * Fixed height is moved from global option to per curent block option
 * Fixed height units expanded to include PX, %, EM, REM. Previously only VH was
   supported.

#### 1.2.4

 * Updated monaco editor to version 0.52.0
 * Updated emmet-monaco-es (for autocomplete) to version 5.5.0 to be compatible 
   with monaco editor 0.52.0

#### 1.2.3

 * Updated monacoe editor loading. 6.6 have removed the class from editor-iframe,
   that we’re using to load monaco editor.
 * Updated getSite() function to use new WP Data API

#### 1.2.2

 * Version bump

#### 1.2.1

 * Updated API paths for WP subfolder installations
 * Language changes take effect immediately; previously, a reload was required
 * Font size changes take effect immediately; previously, a reload was required

#### 1.2.0

 * Updated version number to be higher number, then self hosted one to remove confusion
   witch is the latest one.

#### 1.0.2

 * Fixed fetching API in subfolder wordpress installation.

#### 1.0.1

 * Added check to verify if the block category exists.

#### 1.0.0

 * Release

## 额外信息

 *  版本 **1.5.1**
 *  最后更新：**2 月前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 6.7 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/dblocks-codepro/)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[code](https://cn.wordpress.org/plugins/tags/code/)
   [code block](https://cn.wordpress.org/plugins/tags/code-block/)[html](https://cn.wordpress.org/plugins/tags/html/)
 *  [高级视图](https://cn.wordpress.org/plugins/dblocks-codepro/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/dblocks-codepro/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/dblocks-codepro/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dblocks-codepro/reviews/)

## 贡献者

 *   [ DPlugins ](https://profiles.wordpress.org/dplugins/)
 *   [ Marko Krstić ](https://profiles.wordpress.org/krstivoja/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/dblocks-codepro/)