mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 22:45:18 +02:00
fix moveTo, and add select and deselect to docs, fixes #640
This commit is contained in:
@@ -48,8 +48,9 @@ Transform methods can either operate on the [`Document`](./document.md), the [`S
|
|||||||
- [`move`](#move)
|
- [`move`](#move)
|
||||||
- [`moveOffsetsTo`](#moveoffsetsto)
|
- [`moveOffsetsTo`](#moveoffsetsto)
|
||||||
- [`moveToRangeOf`](#movetorangeof)
|
- [`moveToRangeOf`](#movetorangeof)
|
||||||
- [`moveTo`](#moveto)
|
- [`select`](#select)
|
||||||
- [`selectAll`](#selectall)
|
- [`selectAll`](#selectall)
|
||||||
|
- [`deselect`](#deselect)
|
||||||
- [Node Transforms](#node-transforms)
|
- [Node Transforms](#node-transforms)
|
||||||
- [`addMarkByKey`](#addmarkbykey)
|
- [`addMarkByKey`](#addmarkbykey)
|
||||||
- [`insertNodeByKey`](#insertnodebykey)
|
- [`insertNodeByKey`](#insertnodebykey)
|
||||||
@@ -286,21 +287,26 @@ Move the current selection's offsets by `n`.
|
|||||||
|
|
||||||
Move the current selection's offsets to a new `anchorOffset` and `focusOffset`.
|
Move the current selection's offsets to a new `anchorOffset` and `focusOffset`.
|
||||||
|
|
||||||
### `moveTo`
|
|
||||||
`moveTo(properties: Selection || Object) => Transform`
|
|
||||||
|
|
||||||
Move the current selection to a selection with merged `properties`. The `properties` can either be a [`Selection`](./selection.md) object or a plain Javascript object of selection properties.
|
|
||||||
|
|
||||||
### `moveToRangeOf`
|
### `moveToRangeOf`
|
||||||
`moveToRangeOf(node: Node) => Transform`
|
`moveToRangeOf(node: Node) => Transform`
|
||||||
|
|
||||||
Move the current selection's anchor point to the start of a `node` and its focus point to the end of the `node`.
|
Move the current selection's anchor point to the start of a `node` and its focus point to the end of the `node`.
|
||||||
|
|
||||||
|
### `select`
|
||||||
|
`select(properties: Selection || Object) => Transform`
|
||||||
|
|
||||||
|
Set the current selection to a selection with merged `properties`. The `properties` can either be a [`Selection`](./selection.md) object or a plain Javascript object of selection properties.
|
||||||
|
|
||||||
### `selectAll`
|
### `selectAll`
|
||||||
`selectAll() => Transform`
|
`selectAll() => Transform`
|
||||||
|
|
||||||
Select the entire document and focus the selection.
|
Select the entire document and focus the selection.
|
||||||
|
|
||||||
|
### `deselect`
|
||||||
|
`deselect() => Transform`
|
||||||
|
|
||||||
|
Unset the selection.
|
||||||
|
|
||||||
|
|
||||||
## Node Transforms
|
## Node Transforms
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user