1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Document wrapBlockByKey

This commit is contained in:
Soreine 2016-10-27 15:13:30 +02:00
parent 6a77aa1cf3
commit 4374eb9b33

View File

@ -59,6 +59,7 @@ Transform methods can either operate on the [`Document`](./document.md), the [`S
- [`splitNodeByKey`](#splitnodebykey)
- [`unwrapInlineByKey`](#unwrapinlinebykey)
- [`unwrapBlockByKey`](#unwrapblockbykey)
- [`wrapBlockByKey`](#wrapblockbykey)
- [Document Transforms](#document-transforms)
- [`deleteAtRange`](#deleteatrange)
- [`deleteBackwardAtRange`](#deletebackwardatrange)
@ -331,6 +332,12 @@ Unwrap all inner content of an [`Inline`](./inline.md) node that match `properti
Unwrap all inner content of a [`Block`](./block.md) node that match `properties`. For convenience, you can pass a `type` string or `properties` object.
### `wrapBlockByKey`
`wrapBlockByKey(key: String, properties: Object) => Transform` <br/>
`wrapBlockByKey(key: String, type: String) => Transform`
Wrap the given node in a [`Block`](./block.md) node that match `properties`. For convenience, you can pass a `type` string or `properties` object.
## Document Transforms
### `deleteBackwardAtRange`