mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
update docs
This commit is contained in:
@@ -70,7 +70,7 @@ If you're using Slate for the first time, check out the [Getting Started](./docs
|
|||||||
|
|
||||||
- **Reference**
|
- **Reference**
|
||||||
- Components
|
- Components
|
||||||
- Editor
|
- [Editor](docs/reference/components/editor.md)
|
||||||
- Models
|
- Models
|
||||||
- Block
|
- Block
|
||||||
- Character
|
- Character
|
||||||
@@ -79,7 +79,7 @@ If you're using Slate for the first time, check out the [Getting Started](./docs
|
|||||||
- Inline
|
- Inline
|
||||||
- Mark
|
- Mark
|
||||||
- Node
|
- Node
|
||||||
- Selection
|
- [Selection](docs/reference/models/selection.md)
|
||||||
- State
|
- State
|
||||||
- Text
|
- Text
|
||||||
- Transform
|
- Transform
|
||||||
|
@@ -27,6 +27,8 @@ Often times, you don't need to specifically know which point is the "anchor" and
|
|||||||
- [`isForward`](#isForward-boolean)
|
- [`isForward`](#isForward-boolean)
|
||||||
- [`startKey`](#startkey-string)
|
- [`startKey`](#startkey-string)
|
||||||
- [`startOffset`](#startoffset-number)
|
- [`startOffset`](#startoffset-number)
|
||||||
|
- [Static Methods](#static-methods)
|
||||||
|
- [`create(properties)`](#create-properties)
|
||||||
- [Checking Methods](#checking-methods)
|
- [Checking Methods](#checking-methods)
|
||||||
- [`has{Edge}AtEndOf(node)`](hasedgeatendof-node)
|
- [`has{Edge}AtEndOf(node)`](hasedgeatendof-node)
|
||||||
- [`has{Edge}AtStartOf(node)`](hasedgeatstartof-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
|
## Properties
|
||||||
|
|
||||||
```js
|
```js
|
||||||
new Selection({
|
Selection({
|
||||||
anchorKey: String,
|
anchorKey: String,
|
||||||
anchorOffset: Number,
|
anchorOffset: Number,
|
||||||
focusKey: String,
|
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.
|
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
|
## Checking Methods
|
||||||
|
|
||||||
#### `has{Edge}AtStartOf(node: Node) => Boolean`
|
#### `has{Edge}AtStartOf(node: Node) => Boolean`
|
||||||
|
Reference in New Issue
Block a user