mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
update utils docs
This commit is contained in:
parent
bf99d48ccb
commit
b393969ede
@ -1,8 +1,25 @@
|
||||
|
||||
# Utils
|
||||
|
||||
These are extra utility functions that ship with Slate that may be useful for certain use cases.
|
||||
```js
|
||||
import {
|
||||
findDOMNode,
|
||||
setKeyGenerator
|
||||
} from 'slate'
|
||||
```
|
||||
|
||||
Utility functions that ship with Slate that may be useful for certain use cases.
|
||||
|
||||
- [`findDOMNode`](#finddomnode)
|
||||
- [`setKeyGenerator`](#setkeygenerator)
|
||||
|
||||
|
||||
## Functions
|
||||
|
||||
### `findDOMNode`
|
||||
`findDOMNode(key: String) => DOMElement`
|
||||
|
||||
Allows you to find the DOM node for a Slate [`Node`](../models/node.md) by passing its `key` string. Modelled after React's built-in `findDOMNode` helper.
|
||||
|
||||
### `setKeyGenerator`
|
||||
`setKeyGenerator(generator: Function) => Void`
|
||||
|
Loading…
x
Reference in New Issue
Block a user