-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Experimental: Disable TinyMCE compat with classic editor #52325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's no harm in this. I'm a bit surprised that check is a function and not a filter, but that's not relevant to this change.
Thanks @tyxla for following up on this.
Well, there's a filter with the same name so plugins can alter it, but there are a few more conditions under which the filter never runs. It's a bit odd because in those cases, the filter will not be considered. So the safer bet is to use the function: |
Warning: Type of PR label error To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. |
What?
This PR makes the TinyMCE removal experiment compatible with the Classic Editor plugin and other plugins that disable the block editor.
Why?
In #50387 we introduced an experiment that allows us to remove TinyMCE from initial loading when we can. We're now polishing it in terms of plugin interoperability to make sure there are regressions and weird edge cases.
How?
We augment the existing
gutenberg_post_being_edited_requires_classic_block()
checks to also handle if theuse_block_editor_for_post_type
filter was used to disable the block editor specifically for a post type. This is the same filter that the Classic Editor plugin is using.Testing Instructions
Testing Instructions for Keyboard
None
Screenshots or screencast
None