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

update docs

This commit is contained in:
Ian Storm Taylor 2016-07-11 16:06:33 -07:00
parent b2c6b87184
commit a6056960be
2 changed files with 12 additions and 3 deletions

View File

@ -70,7 +70,7 @@ If you're using Slate for the first time, check out the [Getting Started](./docs
- **Reference**
- Components
- Editor
- [Editor](docs/reference/components/editor.md)
- Models
- Block
- Character
@ -79,7 +79,7 @@ If you're using Slate for the first time, check out the [Getting Started](./docs
- Inline
- Mark
- Node
- Selection
- [Selection](docs/reference/models/selection.md)
- State
- Text
- Transform

View File

@ -27,6 +27,8 @@ Often times, you don't need to specifically know which point is the "anchor" and
- [`isForward`](#isForward-boolean)
- [`startKey`](#startkey-string)
- [`startOffset`](#startoffset-number)
- [Static Methods](#static-methods)
- [`create(properties)`](#create-properties)
- [Checking Methods](#checking-methods)
- [`has{Edge}AtEndOf(node)`](hasedgeatendof-node)
- [`has{Edge}AtStartOf(node)`](hasedgeatstartof-node)
@ -52,7 +54,7 @@ Often times, you don't need to specifically know which point is the "anchor" and
## Properties
```js
new Selection({
Selection({
anchorKey: String,
anchorOffset: Number,
focusKey: String,
@ -115,6 +117,13 @@ The opposite of `isBackward`, for convenience.
A few convenience properties for accessing the first and last point of the selection. When the selection is forward, `start` refers to the `anchor` point and `end` refers to the `focus` point. And when it's backward they are reversed.
## Static Methods
#### `create(properties)`
Create a new `Selection` instance with `properties`.
## Checking Methods
#### `has{Edge}AtStartOf(node: Node) => Boolean`