How can I programmatically disable Gutenberg query block patterns?

You can disable all “experimental block patterns” including the query block patterns by adding a filter: add_action( ‘init’, function() { add_filter( ‘block_editor_settings_all’, function ($editor_settings) { $editor_settings[‘__experimentalBlockPatterns’] = []; return $editor_settings; } ); }); You can see all editor settings (that you could disable with this filter) in this comment: https://developer.wordpress.org/reference/hooks/block_editor_settings_all/#comment-5661

How to create pre-designed page layouts for Gutenberg?

You have a number of options. But the best method I have found is to use combination of custom blocks that allow the user to rearrange content themselves and custom post meta (depending on the situation). For simple things, I stick to custom blocks. I create section blocks, card blocks etc, that have strict functionality … Read more

Is there a way to grab the current value of the editor in Gutenburg/Classic WordPress editor? (Not the saved value of the post!)

If someone stumbles upon same issue I found a way to achieve what I wanted (I hope someone is helped by this). This is my solution: getEditedPostContent() contains the temporary post (modified) content: let old_content=””; if ($(‘textarea#content’).length >0) { old_content = $(‘textarea#content’).html(); } else { //”Gutenburg” style (>=WP 5.8) old_content = wp.data.select( ‘core/editor’ ).getCurrentPost().content; if … Read more