standalone-block-editor
standalone-block-editor copied to clipboard
Custom blocks not showing up on the editor
Hi Dave,
Gr8 work, I'm using this as a starter to build a drag and drop form builder. My plan is to build a outer form wrapper and drag and drop custom components into this wrapper to build the form. The custom components I build shows up on the normal page and post editors but it doesn't show up on my custom editor, any help would be appreciated.
Thx
Hi @anver did you found an solution? I have the same problem with server side registered blocks. Core-Blocks work perfect.
Is there a solution for this problem? @getdave @devfle @anver
@rezaelahidev I don't have one at the moment. Pull requests are very welcome.
You could also consider https://github.com/Automattic/isolated-block-editor/
Hey @rezaelahidev @getdave,
to load custom blocks, you have to set a screen and the is_block_editor property to true. Then all 3rd Party Blocks register correctly. https://developer.wordpress.org/reference/classes/wp_screen/is_block_editor/
Github: https://github.com/WordPress/wordpress-develop/blob/6.0.2/src/wp-admin/includes/class-wp-screen.php#L196
Hey @rezaelahidev @getdave,
to load custom blocks, you have to set a screen and the is_block_editor property to true. Then all 3rd Party Blocks register correctly. https://developer.wordpress.org/reference/classes/wp_screen/is_block_editor/
Github: https://github.com/WordPress/wordpress-develop/blob/6.0.2/src/wp-admin/includes/class-wp-screen.php#L196
@devfle thank you for this. Would you consider raising a PR to add this functionality by default?
@devfle I see this code is already in the init.php:
$current_screen->is_block_editor( true );
But custom blocks still not registering.
@rilwis i will look tomorrow.
Created a PR that should fix this issue.