What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
Gutenberg block missing classes inside editor
I guess this is expected behavior. If I add a similar console.log to native core blocks that use useState, I get the same effect. It seems that WordPress operates with use strict, and according to this answer, React double-invokes a number of things when in strict mode.
How to identify what templates are being loaded in a block-based theme [closed]
New Categories Not Shown In the Post Edit Page
How to add extra option to WP core gallery block?
Listening change event of taxonomy term checkboxes in Gutenberg editor
I solve this problem by myself. The detail is here. https://github.com/WordPress/gutenberg/issues/28509
Custom Post Type and Custom REST API Endpoint result in Gutenberg editor not working
You would do this with the format API, for example, this code from the handbook will add a <samp> tag around text: import { registerFormatType, toggleFormat } from ‘@wordpress/rich-text’; import { RichTextToolbarButton } from ‘@wordpress/block-editor’; const MyCustomButton = ( props ) => { return <RichTextToolbarButton icon=’editor-code’ title=”Sample output” onClick={ () => { props.onChange( toggleFormat( props.value, … Read more