Implement Panel Color Inspector Control in Gutenberg

Many wp.blocks.* controls have been moved to wp.editor.* (see release notes). Specifically wp.blocks.InspectorControls is now wp.editor.InspectorControls – you’ll need to change the first line of your code. Note: registerBlockType is still imported from wp.blocks.* iirc. As a side note, I’ve also found that the focus && trick no longer required as GB automatically displays the … Read more

What version of Gutenberg is included with WordPress?

You can find the versions in WordPress here with this recently created document: https://developer.wordpress.org/block-editor/principles/versions-in-wordpress/ You weren’t alone in wanting to have this information 🙂 As mentioned above, it can be tricky to directly line up versions but this is the closest approximation currently. When WordPress 5.5 is launched, this document will be updated.

Gutenberg Inspector Controls

TextControl is from wp.components not wp.blocks. const { registerBlockType, RichText, AlignmentToolbar, BlockControls, InspectorControls, } = wp.blocks; const { TextControl } = wp.components; Changing that I was able to get your block to work fine instead of error in Gutenberg 2.2.0.

Get the current block ID

The block id is saved in the clientId field. It’s regenerated at each save of the post and is only available in props in the edit function. In order to use this field as unique id in the save function, it needs to be saved as attribute in the edit section. It will be then … Read more

Change order/position of Gutenberg inspector control panel

<InspectorControls> <PanelBody title={ __( ‘Settings One’ ) }> </PanelBody> <PanelBody title={ __( ‘Settings Two’ ) }> </PanelBody> <PanelBody title={ __( ‘Settings Three’ ) > </PanelBody> </InspectorControls> If you insert multiple Panelbody like I did in above code. You will have multiple inspector controls with first one being ope by default. Change the panelbody accordingly to … Read more

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş