Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@wordpress/rich-text

WordPress394kGPL-2.0-or-later7.22.0TypeScript support: included

Rich text value and manipulation API.

wordpress, gutenberg, rich-text

readme

Gutenberg

End-to-End Tests Static Analysis (Linting, License, Type checks...) Unit Tests Create Block React Native E2E Tests (iOS) React Native E2E Tests (Android)

Storybook Badge

lerna

Screenshot of the Gutenberg Editor, editing a post in WordPress

Welcome to the development hub for the WordPress Gutenberg project!

"Gutenberg" is a codename for a whole new paradigm in WordPress site building and publishing, that aims to revolutionize the entire publishing experience as much as Gutenberg did the printed word. Right now, the project is in the second phase of a four-phase process that will touch every piece of WordPress -- Editing, Customization, Collaboration (which includes Real-time collaboration, Asynchronous collaboration, Publishing flows, Post revisions interface, Admin design, Library), and Multilingual -- and is focused on a new editing experience, the block editor.

The block editor introduces a modular approach to pages and posts: each piece of content in the editor, from a paragraph to an image gallery to a headline, is its own block. And just like physical blocks, WordPress blocks can be added, arranged, and rearranged, allowing WordPress users to create media-rich pages in a visually intuitive way -- and without work-arounds like shortcodes or custom HTML.

The block editor first became available in December 2018, and we're still hard at work refining the experience, creating more and better blocks, and laying the groundwork for the next three phases of work. The Gutenberg plugin gives you the latest version of the block editor, so you can join us in testing bleeding-edge features, start playing with blocks, and maybe get inspired to build your own.

Check out the Keeping up with Gutenberg Index

Getting Started

Get hands on: check out the block editor live demo to play with a test instance of the editor.

Using Gutenberg

Developing for Gutenberg

Extending and customizing is at the heart of the WordPress platform, this is no different for the Gutenberg project. The editor and future products can be extended by third-party developers using plugins.

Review the Quick Start Guide for the fastest way to get started extending the block editor. See the Block Editor Handbook for extensive tutorials, documentation, and API references. Also, check the WordPress Developer Blog for great articles about block development, among other topics.

Contribute to Gutenberg

Gutenberg is an open-source project and welcomes all contributors from code to design, and from documentation to triage. The project is built by many contributors and volunteers, and we'd love your help building it.

See the Contributors Handbook for all the details on how you can contribute.

To get up and running quickly with code contribution see Getting Started With Code Contribution. Also check out the other resources available on the Code Contributions page.

In whichever way you wish to contribute please be sure to read the Contributing Guidelines first.

As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.

Get Involved

You can join us in the #core-editor channel in Slack, see the WordPress Slack page for signup information; it is free to join.

License

WordPress is free software, and is released under the terms of the GNU General Public License version 2 or (at your option) any later version. See LICENSE.md for complete license.



Code is Poetry.

changelog

Unreleased

7.22.0 (2025-04-11)

7.21.0 (2025-03-27)

7.20.0 (2025-03-13)

7.19.0 (2025-02-28)

7.18.0 (2025-02-12)

7.17.0 (2025-01-29)

7.16.0 (2025-01-15)

7.15.0 (2025-01-02)

7.14.0 (2024-12-11)

7.13.0 (2024-11-27)

7.12.0 (2024-11-16)

7.11.0 (2024-10-30)

7.10.0 (2024-10-16)

7.9.0 (2024-10-03)

7.8.0 (2024-09-19)

7.7.0 (2024-09-05)

7.6.0 (2024-08-21)

7.5.0 (2024-08-07)

7.4.0 (2024-07-24)

7.3.0 (2024-07-10)

7.2.0 (2024-06-26)

7.1.0 (2024-06-15)

7.0.0 (2024-05-31)

Breaking Changes

  • Increase the minimum required Node.js version to v18.12.0 matching long-term support releases (#31270). Learn more about Node.js releases.

6.35.0 (2024-05-16)

6.34.0 (2024-05-02)

6.33.0 (2024-04-19)

6.32.0 (2024-04-03)

6.31.0 (2024-03-21)

6.30.0 (2024-03-06)

6.29.0 (2024-02-21)

6.28.0 (2024-02-09)

6.27.0 (2024-01-24)

6.26.0 (2024-01-10)

6.25.0 (2023-12-13)

6.24.0 (2023-11-29)

6.23.0 (2023-11-16)

6.22.0 (2023-11-02)

6.21.0 (2023-10-18)

6.20.0 (2023-10-05)

6.19.0 (2023-09-20)

6.18.0 (2023-08-31)

6.17.0 (2023-08-16)

6.16.0 (2023-08-10)

6.15.0 (2023-07-20)

6.14.0 (2023-07-05)

6.13.0 (2023-06-23)

6.12.0 (2023-06-07)

6.11.0 (2023-05-24)

6.10.0 (2023-05-10)

6.9.0 (2023-04-26)

6.8.0 (2023-04-12)

6.7.0 (2023-03-29)

6.6.0 (2023-03-15)

6.5.0 (2023-03-01)

6.4.0 (2023-02-15)

6.3.0 (2023-02-01)

6.2.0 (2023-01-11)

6.1.0 (2023-01-02)

6.0.0 (2022-12-14)

Breaking Changes

  • Updated dependencies to require React 18 (45235)

5.20.0 (2022-11-16)

5.19.0 (2022-11-02)

Deprecations

  • Update deprecation message for the useAnchorRef hook (#45195).

5.18.0 (2022-10-19)

5.17.0 (2022-10-05)

5.16.0 (2022-09-21)

Deprecations

  • Introduced new useAnchor hook, which works better with the new Popover component APIs. The previous useAnchorRef hook is now marked as deprecated, and is scheduled to be removed in WordPress 6.3 (#43691).

5.15.0 (2022-09-13)

5.14.0 (2022-08-24)

5.13.0 (2022-08-10)

5.12.0 (2022-07-27)

5.11.0 (2022-07-13)

5.10.0 (2022-06-29)

5.9.0 (2022-06-15)

5.8.0 (2022-06-01)

5.7.0 (2022-05-18)

5.6.0 (2022-05-04)

5.5.0 (2022-04-21)

5.4.0 (2022-04-08)

5.3.0 (2022-03-23)

5.2.0 (2022-03-11)

5.1.1 (2022-02-10)

Bug Fixes

  • Removed unused @wordpress/dom, @wordpress/is-shallow-equal and classnames dependencies (#38388).

5.1.0 (2022-01-27)

5.0.0 (2021-07-29)

Breaking Changes

  • Upgraded React components to work with v17.0 (#29118). There are no new features in React v17.0 as explained in the blog post.

4.2.0 (2021-07-21)

4.1.0 (2021-05-20)

4.0.0 (2021-05-14)

Breaking Changes

3.25.0 (2021-03-17)

3.24.0 (2020-12-17)

New Features

  • Added a store definition store for the rich-text namespace to use with @wordpress/data API (#26655).

3.3.0 (2019-05-21)

Internal

  • Removed and renamed undocumented functions and constants:
    • Removed charAt
    • Removed getSelectionStart
    • Removed getSelectionEnd
    • Removed insertLineBreak
    • Renamed isEmptyLine to __unstableIsEmptyLine
    • Renamed insertLineSeparator to __unstableInsertLineSeparator
    • Renamed apply to __unstableApply
    • Renamed unstableToDom to __unstableToDom
    • Renamed LINE_SEPARATOR to __UNSTABLE_LINE_SEPARATOR
    • Renamed indentListItems to __unstableIndentListItems
    • Renamed outdentListItems to __unstableOutdentListItems
    • Renamed changeListType to __unstableChangeListType

3.1.0 (2019-03-06)

Enhancements

  • Added format boundaries.
  • Removed parameters from create to filter out content.
  • Removed the createLinePadding from apply, which is now built in.
  • Improved format placeholder.
  • Improved dom diffing.

3.0.4 (2019-01-03)

3.0.3 (2018-12-12)

Internal

  • Internal performance optimizations to avoid excessive expensive creation of DOM documents.

3.0.2 (2018-11-21)

3.0.1 (2018-11-20)

3.0.0 (2018-11-15)

Breaking Changes

  • toHTMLString always expects an object instead of multiple arguments.

2.0.4 (2018-11-09)

2.0.3 (2018-11-09)

Bug Fixes

  • Fix Format Type Assignment During Parsing.
  • Fix applying formats on multiline values without wrapper tags.

2.0.2 (2018-11-03)

2.0.1 (2018-10-30)

2.0.0 (2018-10-30)

  • Remove @wordpress/blocks as a dependency.

1.0.2 (2018-10-29)

1.0.1 (2018-10-19)

1.0.0 (2018-10-18)

  • Initial release.