get used blocks in post and detect changing
You can access the blocks used in the post in js using getBlocks(): wp.data.select( ‘core/block-editor’ ).getBlocks(); In terms of updating on changes – the editor saves all it’s data in a store, so you would want to subscribe and react based on what changes you need to react to. As an example: ( () => … Read more