1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

Document replaceNodeByKey (#1200)

* Document `replaceNodeByKey`

* Update change.md
This commit is contained in:
Conor Cussell
2017-10-02 20:29:16 +02:00
committed by Ian Storm Taylor
parent f9894ed443
commit e0d7122881

View File

@@ -273,6 +273,11 @@ Remove a `mark` from `length` characters starting at an `offset` in a [`Node`](.
Remove a [`Node`](./node.md) from the document by its `key`.
### `replaceNodeByKey`
`replaceNodeByKey(key: String, node: Node) => Change`
Replace a [`Node`](./node.md) in the document with a new [`Node`](./node.md) by its `key`.
### `removeTextByKey`
`removeTextByKey(key: String, offset: Number, length: Number) => Change`