Notes on creating custom block

Setting up the environment

The @wordpress/scripts package abstracts webpack & Babel away to standardize and simplify development, so you won’t need to handle the details for configuring them. See the @wordpress/scripts package documentation for configuration details.

2 ways to register a block

What’s the difference & which to use

  • PHP – register_block_type()
  • JS – registerBlockType

Controls

Above block
  • Alignment
  • Text Alignment –
  • Text Settings –
  • https://developer.wordpress.org/block-editor/tutorials/block-tutorial/block-controls-toolbar-and-sidebar/#block-toolbar

A White Pixel – Create Block Tutorial – Toolbars

Sidebar block controls

Tutorial at A White Pixel

Tools for updating installed and running Blocks – so you don’t lose data

See lesson 58 & 59 of Gutenberg Blocks for WordPress

Customizing WordPress Editor for Clients

Lets break these down into steps and go through them one at a time.

Basic Level

Lets get a nice clean setup using our function.php and some css/scss files.

Styling it out

Customising to a deeper level