How to override gutenberg paragraph block edit property
How to override gutenberg paragraph block edit property
How to override gutenberg paragraph block edit property
It is possible – in fact, the Block Editor and any number of the @wordpress/ Gutenberg packages can be used stand-alone entirely outside of WordPress – but for the moment it’s quite a bit more of an involved process than the convenient wp_editor() function, and what exactly you’d need to do to make it work … Read more
How to Add predefined CSS Classes to a Block using Gutenberg
ACF custom block get_field() shows null on front-end? [closed]
We can try to use has_block(), has_blocks() and parse_blocks() to find an embed with a given providerNameSlug attribute. Untested suggestion: function has_block_embed_by_provider_wpse( $provider, $post = null ) { if ( ! has_blocks( $post ) ) { return false; } if ( ! is_string( $post ) ) { $wp_post = get_post( $post ); if ( $wp_post … Read more
You need to “subscribe” to changes (see this issue) with wp.data.subcribe. A more modern version would have you use useSelect() to get the blocks. It will automatically update blocks if it changes (i.e. it will first return null, then an array of blocks once the API request completes). import { useSelect } from ‘@wordpress/data’; const … Read more
Show pasted link text with diacritics not encoded
Unsaved changes in metabox inputs not detected in the block editor
After more digging I see how the core blocks do it now. It only works if there is ONE block type allowed as a child block, which isn’t useful in my case. https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/button-block-appender/index.js#L37-L42 So, it looks like this is not possible right now unless you define your own custom appender.
How to insert text at the current cursor position in Gutenberg?