1
0
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:
Ian Storm Taylor 2016-11-28 10:56:42 -08:00
parent bf99d48ccb
commit b393969ede

View File

@ -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`