How to build BOTH non-block components and blocks present in the /src directory using @wordpress/scripts

I’m pasting the answer I got from a developer in the Gutenberg repository. Just add a webpack.config.js file at the root of your project with the following contents: const defaultConfig = require( ‘@wordpress/scripts/config/webpack.config’ ); module.exports = { …defaultConfig, entry: { …defaultConfig.entry(), index: ‘./src/index.js’, }, }; This will build all the blocks in /src/blocks/ folder and … Read more

Detecting whenever a user types – in the Gutenberg editor, and checking if there is a preceding or succeeding – then converting both to an em dash

I managed to find an answer to this. Instead of adding an event listener to the editor, I hooked some additional functionality onto Gutenberg’s Autocompleter instead: I wrote a post here detailing how I did this, if anyone is looking to do the same thing: https://blog.terresquall.com/2023/06/how-i-made-double-dashes-automatically-convert-to-em-dashes-in-wordpress-gutenberg-editor/

Image size not showing up in ‘wp/v2/media’

If you register an image size of 1000×1000 then upload an image with an original resolution of 500×500, WordPress will resize it to create smaller versions, but it will not upscale the image to create larger versions. This is because a larger version would be bigger but have the same resolution, WordPress can’t invent details … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)