Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP-70 fix broken block editor styling #9

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

i-am-chitti
Copy link
Member

Description

With the update of apiVersion to 3 in the block settings, the block editor assets are no longer applied. In latest version, the post editor is rendered in an iFrame. Though the editor.css will be enqueued but won't be applied on the block present inside the iframe.
WordPress has suggested to use this approach to enqueue the editor assets - https://developer.wordpress.org/block-editor/how-to-guides/enqueueing-assets-in-the-editor/#editor-content-scripts-and-styles

Refer to this on why editor is being rendered in iframe - https://make.wordpress.org/core/2021/06/29/blocks-in-an-iframed-template-editor/

Screenshots

Before -
image

After -
image

@i-am-chitti i-am-chitti self-assigned this Apr 30, 2024
@i-am-chitti i-am-chitti requested a review from junaidbhura April 30, 2024 12:08
@junaidbhura junaidbhura merged commit 7a79282 into master Apr 30, 2024
1 check passed
@junaidbhura junaidbhura deleted the WP-70/fix-block-editor-styling branch April 30, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants