Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Oct 1, 2019
1 parent 0913b2c commit 5a8f188
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,21 @@ _Returns_

- `Array<Editor.InserterItem>`: Items that appear in inserter.

<a name="getInsertionIndex" href="#getInsertionIndex">#</a> **getInsertionIndex**

Determines whether there is only one item that may be inserted.

_Parameters_

- _state_ `Object`: Editor state.
- _clientId_ `?string`: Block client ID.
- _destinationRootClientId_ `?string`: Root client ID of block list.
- _isAppender_ `boolean`: Determines if the block is added to a set of existing blocks in a list.

_Returns_

- `number`: The insertion index.

<a name="getLastMultiSelectedBlockClientId" href="#getLastMultiSelectedBlockClientId">#</a> **getLastMultiSelectedBlockClientId**

Returns the client ID of the last block in the multi-selection set, or null
Expand Down Expand Up @@ -439,6 +454,19 @@ _Returns_

- `?string`: Adjacent block's client ID, or null if none exists.

<a name="getOneAllowedItem" href="#getOneAllowedItem">#</a> **getOneAllowedItem**

Determines whether there is only one item that may be inserted.

_Parameters_

- _state_ `Object`: Editor state.
- _rootClientId_ `?string`: Optional root client ID of block list.

_Returns_

- `string`: The name of the allowed block.

<a name="getPreviousBlockClientId" href="#getPreviousBlockClientId">#</a> **getPreviousBlockClientId**

Returns the previous block's client ID from the given reference start ID.
Expand Down Expand Up @@ -605,6 +633,19 @@ _Returns_

- `boolean`: Whether multi-selection has been made.

<a name="hasOneAllowedItem" href="#hasOneAllowedItem">#</a> **hasOneAllowedItem**

Determines whether there is only one item that may be inserted.

_Parameters_

- _state_ `Object`: Editor state.
- _rootClientId_ `?string`: Optional root client ID of block list.

_Returns_

- `boolean`: True if there is one item available, false if zero or more than one.

<a name="hasSelectedBlock" href="#hasSelectedBlock">#</a> **hasSelectedBlock**

Returns true if there is a single selected block, or false otherwise.
Expand Down

0 comments on commit 5a8f188

Please sign in to comment.