Skip to content

feat(richtext-lexical): adds createdBlock in EditorConfigContext to allow custom admin Block components to open drawer on block create#11299

Closed
sebastianmulders wants to merge 1 commit into
payloadcms:mainfrom
sebastianmulders:feat/add-created-block-to-editor-config-context
Closed

feat(richtext-lexical): adds createdBlock in EditorConfigContext to allow custom admin Block components to open drawer on block create#11299
sebastianmulders wants to merge 1 commit into
payloadcms:mainfrom
sebastianmulders:feat/add-created-block-to-editor-config-context

Conversation

@sebastianmulders
Copy link
Copy Markdown

@sebastianmulders sebastianmulders commented Feb 20, 2025

What?

Enable custom admin Block components to open the field drawer when inserted into the editor.

Why?

Currently, there is no straightforward way to determine which Block component was inserted, making it impossible to trigger the field drawer automatically. However, the InlineBlock component already supports this behavior. To achieve the same functionality for Block components, it is necessary to identify the inserted BlockNode.

How?

This PR ensures that the inserted BlockNode is accessible, allowing custom Block components to use this information to open the field drawer upon insertion.

…llow custom admin Block components to open drawer on block create
@github-actions github-actions Bot added the stale label Mar 29, 2025
@sebastianmulders sebastianmulders closed this by deleting the head repository Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant