mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-03 12:12:39 +02:00
Implement "wrapInlineByKey" and use it in "wrapInlineAtRange"
This commit is contained in:
@@ -60,6 +60,7 @@ Transform methods can either operate on the [`Document`](./document.md), the [`S
|
||||
- [`unwrapInlineByKey`](#unwrapinlinebykey)
|
||||
- [`unwrapBlockByKey`](#unwrapblockbykey)
|
||||
- [`wrapBlockByKey`](#wrapblockbykey)
|
||||
- [`wrapInlineByKey`](#wrapinlinebykey)
|
||||
- [Document Transforms](#document-transforms)
|
||||
- [`deleteAtRange`](#deleteatrange)
|
||||
- [`deleteBackwardAtRange`](#deletebackwardatrange)
|
||||
@@ -338,6 +339,12 @@ Unwrap all inner content of a [`Block`](./block.md) node that match `properties`
|
||||
|
||||
Wrap the given node in a [`Block`](./block.md) node that match `properties`. For convenience, you can pass a `type` string or `properties` object.
|
||||
|
||||
### `wrapInlineByKey`
|
||||
`wrapInlineByKey(key: String, properties: Object) => Transform` <br/>
|
||||
`wrapInlineByKey(key: String, type: String) => Transform`
|
||||
|
||||
Wrap the given node in a [`Inline`](./inline.md) node that match `properties`. For convenience, you can pass a `type` string or `properties` object.
|
||||
|
||||
## Document Transforms
|
||||
|
||||
### `deleteBackwardAtRange`
|
||||
|
Reference in New Issue
Block a user