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

update docs

This commit is contained in:
Ian Storm Taylor
2017-02-27 13:05:41 -08:00
parent 7b2ff734dd
commit 414188b76d
2 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ Often times, you don't need to specifically know which point is the "anchor" and
- [`startOffset`](#startoffset) - [`startOffset`](#startoffset)
- [Static Methods](#static-methods) - [Static Methods](#static-methods)
- [`Selection.create`](#selectioncreate) - [`Selection.create`](#selectioncreate)
- [Methods](#checking-methods) - [Checking Methods](#checking-methods)
- [`has{Edge}AtEndOf`](#hasedgeatendof) - [`has{Edge}AtEndOf`](#hasedgeatendof)
- [`has{Edge}AtStartOf`](#hasedgeatstartof) - [`has{Edge}AtStartOf`](#hasedgeatstartof)
- [`has{Edge}Between`](#hasedgebetween) - [`has{Edge}Between`](#hasedgebetween)
@@ -122,7 +122,7 @@ A few convenience properties for accessing the first and last point of the selec
Create a new `Selection` instance with `properties`. Create a new `Selection` instance with `properties`.
## Methods ## Checking Methods
### `has{Edge}AtStartOf` ### `has{Edge}AtStartOf`
`has{Edge}AtStartOf(node: Node) => Boolean` `has{Edge}AtStartOf(node: Node) => Boolean`

View File

@@ -45,10 +45,10 @@ Transform methods can either operate on the [`Document`](./document.md), the [`S
- [`extendTo{Edge}Of`](#extendtoedgeof) - [`extendTo{Edge}Of`](#extendtoedgeof)
- [`extend{Direction}`](#extenddirection) - [`extend{Direction}`](#extenddirection)
- [`focus`](#focus) - [`focus`](#focus)
- [`moveToOffsets`](#movetooffsets) - [`move`](#move)
- [`moveOffsetsTo`](#moveoffsetsto)
- [`moveToRangeOf`](#movetorangeof) - [`moveToRangeOf`](#movetorangeof)
- [`moveTo`](#moveto) - [`moveTo`](#moveto)
- [`move{Direction}`](#movedirection)
- [Node Transforms](#node-transforms) - [Node Transforms](#node-transforms)
- [`addMarkByKey`](#addmarkbykey) - [`addMarkByKey`](#addmarkbykey)
- [`insertNodeByKey`](#insertnodebykey) - [`insertNodeByKey`](#insertnodebykey)
@@ -275,13 +275,13 @@ Extend the current selection to the `{Edge}` of a `node`. Where `{Edge}` is eith
Focus the current selection. Focus the current selection.
### `move{Direction}` ### `move`
`move{Direction}(n: Number) => Transform` `move(n: Number) => Transform`
Move the current selection's points `n` characters in `{Direction}`. Where `{Direction}` is either `Backward` or `Forward`. Move the current selection's offsets by `n`.
### `moveToOffsets` ### `moveOffsetsTo`
`moveToOffsets(anchorOffset: Number, focusOffset: Number) => Transform` `moveOffsetsTo(anchorOffset: Number, focusOffset: Number) => Transform`
Move the current selection's offsets to a new `anchorOffset` and `focusOffset`. Move the current selection's offsets to a new `anchorOffset` and `focusOffset`.