registerPlugin for the new block editor for widgets? #41034
Replies: 3 comments 3 replies
-
As far as I know, // ✅ Works in the post editor
import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
// ✅ Works in the site editor
import { PluginSidebarMoreMenuItem } from '@wordpress/edit-site';
// ❌ Doesn't work in the widget editor
import { PluginSidebarMoreMenuItem } from '@wordpress/edit-widgets'; |
Beta Was this translation helpful? Give feedback.
-
Seconding a need for this, I have a block which has a button in its inspector to open a sidebar, however the block won't work in the classic widgets screen, although it looks like this screen can handle sidebars from a UI perspective. I think supporting this here would add consistency to the block editor experience. |
Beta Was this translation helpful? Give feedback.
-
I would like to create an issue from this discussion to bring to the attention of more people and because I believe this should be treated as an enhancement 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I have a small plugin that allows to edit the width of the sidebar in the block editor (https://github.com/davidwebca/wordpress-menu-classes). I currently prevent the enqueueing of the JS code in the new block editor in widgets because it used to crash. Now I realize it doesn't crash, but it doesn't work either. Am I missing something? The 5.8 announcement clearly states that "The Widgets screen is extendable via block editor APIs such as registerPlugin [...]" but it doesn't seem to be the case at all.
Maybe I'm doing something wrong, maybe I'm importing the JS modules from the wrong source, etc. but I can't seem to find any documentation on this specific issue. Any help would be welcome!
Thanks a lot ✌️
Beta Was this translation helpful? Give feedback.
All reactions