Is it possible (safe) to create custom blocks using ES Next format?

Whatever issues you had that caused a block to be “killed” after editing was entirely unrelated to the two different methods of writing the block that you have outlined. Building a custom block using the following method (https://github.com/WordPress/gutenberg-examples/blob/master/03-editable/block.js) of attributes with the –es5 flag appears to be more stable in terms of backwards compatibility. If … Read more

Block background color not appearing on site

If you’re adding theme support for editor-color-palette then you need to add styles for those colours to your stylesheet. As documented: Themes are responsible for creating the classes that apply the colors in different contexts. Core blocks use “color” and “background-color” contexts. So to correctly apply “strong magenta” to all contexts of core blocks a … Read more

WordPress block editor embeds not working in theme (single.php)

That would be because they’re using oEmbed, not a shortcode. You should use the function the_content() to render the content of a post, as it applies all the things required to make embeds, shortcodes, etc work properly. If for some reason that’s not an option, you can apply the content filter. <?php echo apply_filters( ‘the_content’, … Read more

Block Controls not showing

Your edit function is just missing a [ and ], i.e. you forgot to actually return an array, like so: return ([ // add that [ <InspectorControls key=”lx-authors-block-setting” style={ { marginBottom:’40px’} }> … </InspectorControls>, <div className=”lx-authors-block wp-block” key=”container” style={{ backgroundColor: attributes.bgColor}}> … </div> ]); // and add that ] Or you could instead wrap the … Read more

What version of React does Gutenberg use?

WordPress 5.1.1 uses React 16.6.3. You can see this in the package.json file in the development version of WordPress on Trac: https://core.trac.wordpress.org/browser/tags/5.1.1/package.json?rev=44861 This has already been updated in trunk to 16.8.4, so the next major version of WordPress will use at least that version.

How to disable align-wide for specified blocks in Gutenberg

According to the gutenberg handbook you can use the blocks.registerBlockType filter which allows you to play around with the block settings. For most of the wp core blocks modifying the supports.align property works pretty well: wp.hooks.addFilter( ‘blocks.registerBlockType’, ‘my-theme/namespace’, function( settings, name ) { if ( name === ‘core/pullquote’ ) { return lodash.assign( {}, settings, { … Read more

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