Gutenberg: How to use output of php render_callback function in the block editors backend?
I think that you are missing the PHP registration of the block. The JS definition is all right, but you need to tell PHP that the block exists. Can you try to register your block in your plugin or function.php file? Here is an example https://developer.wordpress.org/block-editor/tutorials/block-tutorial/creating-dynamic-blocks/ <?php function simpletoc_toc_render_callback( $attributes, $content ) { return ‘This … Read more