Skip to content

Improve documentation for deprecated wp.editor.RichText.Content #54815

Closed as not planned

Description

@0xTanzim

Description

The documentation for the wp.editor.RichText component should be updated to reflect that it is deprecated and should be replaced with wp.blockEditor.RichText.

Steps to reproduce:

Go to the WordPress documentation page for the wp.editor.RichText component.
Scroll down to the section titled "Usage".
Note that the documentation says to use const { RichText } = wp.editor;.
Expected behavior:

The documentation should say to use const { RichText } = wp.blockEditor; instead.

Actual behavior:

The documentation says to use const { RichText } = wp.editor;.

Step-by-step reproduction instructions

gutenberg/packages/block-editor/src/components/rich-text

Go to the WordPress documentation page for the wp.editor.RichText component.
Scroll down to the section titled "Usage".
Note that the documentation says to use const { RichText } = wp.editor;.

Screenshots, screen recording, code snippet

issue2

Environment info

I have been using a late version of WordPress. 6.3
I use the chrome browser. Desktop. Windows 11Chrome

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. waviaei commented on Dec 6, 2023

    @waviaei
    Contributor

    gutenberg/packages/block-editor/src/components/rich-text

    Go to the WordPress documentation page for the wp.editor.RichText component.
    Scroll down to the section titled "Usage".
    Note that the documentation says to use const { RichText } = wp.editor;.

    Checking at the document https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/rich-text/README.md

    I could no longer find the section "Usage", and the usage example which uses const { RichText } = wp.editor;.

    Looking at the log, this has been fixed in #55841 on Nov 3, after this issue was created.
    24bf989#diff-c7f1fa97855ed23061eacc8c8fe0771c34d049f5ced0fbc10f2eb4aa43c23643

    Then, vanilla JS example has been removed all together at #56121

    So I think we can mark this issue as resolved and close it!

  2. t-hamano commented on Dec 8, 2023

    @t-hamano
    Contributor

    @TanzimHossain2 Thanks for the report.

    As mentioned in the previous comment, I would like to close this problem because there is no longer a string called const { RichText } = wp.editor;.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Developer Documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions