Skip to content

Commit

Permalink
Docs: Block Configuration - Add useOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
Soean authored Oct 5, 2017
1 parent a89801b commit 2e0a718
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/block-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ By default, Gutenberg adds a class with the form `.wp-blocks-your-block-name` to
className: false,
```

### useOnce (optional)

* **Type:** `Bool`
* **Default:** `false`

Whether a block can only be used once per post.

```js
// Use the block just once per post
useOnce: true,
```

## Edit and Save

The `edit` and `save` functions define the editor interface with which a user would interact, and the markup to be serialized back when a post is saved. They are the heart of how a block operates, so they are [covered separately](/block-edit-save/).
Expand Down

0 comments on commit 2e0a718

Please sign in to comment.