how define elements type in attributes type array of gutenberg blocks
how define elements type in attributes type array of gutenberg blocks
how define elements type in attributes type array of gutenberg blocks
Thank you all for your help! I was on it since days! I found my problem: https://webpack.js.org/concepts/entry-points/ helped me to find the solution Apparently path.resolve( process.cwd(), ‘src’, ‘slider.js’ ) was not working: replacing by simple string path fixed the problem: const defaultConfig = require( ‘@wordpress/scripts/config/webpack.config’ ); module.exports = { …defaultConfig, entry: { …defaultConfig.entry, slider: ‘./src/slider.js’, … Read more
Can you edit WP gutenberg block css without a plugin?
It’s worth a mention that storing child block attributes in the parent block’s attributes is a bit of a bizarre practice in isolation – ideally blocks should be completely independent of one-another. But if some functionality necessitates that a parent block access a child block’s attributes, it would likely have a much smaller potential for … Read more
It’s missing some very new blocks (for example templates, template parts), but there is the autocompleter for block grammar.
You can’t use attributes that source data from the HTML markup of your block when using Dynamic Blocks. The attribute selector looks at the Save function’s HTML for the attribute, not the Edit function. You can simply use a type: ‘string’ instead. Hope this helps!
there’s a layout option for the post content block that says it will inherit the default layout. Where is that default coming from? In block themes, the default layout settings (contentSize and wideSize) can be found in the theme.json file in the root theme folder, e.g. at wp-content/themes/twentytwentytwo/theme.json in Twenty Twenty-Two. See source on GitHub … Read more
WordPress does NOT provide date picker block by default but have date component inside core. You need to call relevant components for date picker to work. Here’s code from core Date Component import { DateTimePicker } from ‘@wordpress/components’; import { getSettings } from ‘@wordpress/date’; import { withState } from ‘@wordpress/compose’; const MyDateTimePicker = withState( { … Read more
Possibly, try to wrap it in <pre></pre> tags.
On the new WordPress 5.0 update, I was able to switch between the classic editor & Gutenberg without installing the “Disable Gutenberg” extension. Looking at the release notes for the “Disable Gutenberg” plugin, it states: “Do not use Disable Gutenberg with other plugins (like the Classic Editor plugin) that also disable or replace Gutenberg. Why? … Read more