本文档是WordPress区块编辑器的开发指南,介绍其作为现代网站构建和发布工具的核心概念,包括模块化块系统、主要元素(如插入器、内容画布和设置面板),以及如何通过API进行扩展和定制。
Welcome to the Block Editor Handbook.
The Block Editor is a modern paradigm for WordPress site building and publishing. It uses a modular system of blocks to compose and format content and is designed to create rich and flexible layouts for websites and digital products.
The Block Editor consists of several primary elements, as shown in the following figure:

The elements highlighted are:
Through the Block Editor, you create content modularly using blocks. Many blocks are available in WordPress by default, and you can also create your own.
A block is a discrete element such as a Paragraph, Heading, Media, or Embed. Each block is treated as a separate element with individual editing and format controls. When all these components are pieced together, they make up the content of the page or post, which is then stored in the WordPress database.
The Block Editor is the result of the work done on the Gutenberg project, which aims to revolutionize the WordPress editing experience.
Besides offering an enhanced editing experience through visual content creation tools, the Block Editor is also a powerful developer platform with a rich feature set of APIs that allow it to be manipulated and extended in countless ways.
This handbook is focused on block development and is divided into five major sections.
How-to Guides: Here, you can build on what you learned in the Getting Started section and learn how to solve particular problems. You will also find tutorials and example code to reuse in your own projects, such as working with WordPress data or Curating the Editor Experience.
Reference Guides: This section is the heart of the handbook and is where you can get down to the nitty-gritty and look up the details of the particular API you’re working with or need information on. Among other things, the Block API Reference covers most of what you will want to do with a block, and each component and package is also documented here. Components are also documented via Storybook.
Explanations: This section enables you to go deeper and reinforce your practical knowledge with a theoretical understanding of the Architecture of the Block Editor.
Contributor Guide: Gutenberg is open-source software, and everyone is welcome to contribute to the project. This section details how to contribute, whether with code, design, documentation, or in some other way.
This handbook should be considered the canonical resource for all things related to block development. However, there are other resources that can help you.
block-library (core blocks) or components (common UI elements). The block-development-examples repository is another useful reference.The Block Editor Handbook is designed for those looking to create and develop for the Block Editor. However, it’s important to note that there are multiple other handbooks available within the Developer Resources that you may find beneficial: