Skip to content

Commit

Permalink
Tutorial: Specify block naming restrictions (#18117)
Browse files Browse the repository at this point in the history
* Tutorial: Specify block naming restrictions

* Remove an incorrect comma
  • Loading branch information
jblz authored and gziolo committed Oct 28, 2019
1 parent 9023ca2 commit a6e1252
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@ Once a block is registered, you should immediately see that it becomes available

A block name must be prefixed with a namespace specific to your plugin. This helps prevent conflicts when more than one plugin registers a block with the same name. In this example, the namespace is `gutenberg-examples`.

Block names _must_ include only lowercase alphanumeric characters or dashes and start with a letter. Example: `my-plugin/my-custom-block`.

The `edit` and `save` functions describe the structure of your block in the context of the editor and the saved content respectively. While the difference is not obvious in this simple example, in the following sections we'll explore how these are used to enable customization of the block in the editor preview.

0 comments on commit a6e1252

Please sign in to comment.