mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 12:41:44 +02:00
remove non-transform transforming methods from reference
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
- [`kind`](#kind)
|
- [`kind`](#kind)
|
||||||
- [`length`](#length)
|
- [`length`](#length)
|
||||||
- [`text`](#text)
|
- [`text`](#text)
|
||||||
- [Retrieval Methods](#retrieval-methods)
|
- [Methods](#methods)
|
||||||
- [`filterDescendants`](#filterdescendants)
|
- [`filterDescendants`](#filterdescendants)
|
||||||
- [`findDescendant`](#finddescendant)
|
- [`findDescendant`](#finddescendant)
|
||||||
- [`getBlocksAtRange`](#getblockatrange)
|
- [`getBlocksAtRange`](#getblockatrange)
|
||||||
@@ -35,10 +35,6 @@
|
|||||||
- [`getTextsAtRange`](#gettextsatrange)
|
- [`getTextsAtRange`](#gettextsatrange)
|
||||||
- [`hasChild`](#haschild)
|
- [`hasChild`](#haschild)
|
||||||
- [`hasDescendant`](#hasdescendant)
|
- [`hasDescendant`](#hasdescendant)
|
||||||
- [Transform Methods](#transform-methods)
|
|
||||||
- [`mapDescendants`](#mapdescendants)
|
|
||||||
- [`removeDescendant`](#removedescendant)
|
|
||||||
- [`updateDescendant`](#updatedescendant)
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
@@ -67,7 +63,7 @@ The sum of the lengths of all of the descendant [`Text`](./text.md) nodes of thi
|
|||||||
A concatenated string of all of the descendant [`Text`](./text.md) nodes of this node.
|
A concatenated string of all of the descendant [`Text`](./text.md) nodes of this node.
|
||||||
|
|
||||||
|
|
||||||
## Retrieval Methods
|
## Methods
|
||||||
|
|
||||||
### `filterDescendants`
|
### `filterDescendants`
|
||||||
`filterDescendants(iterator: Function) => List`
|
`filterDescendants(iterator: Function) => List`
|
||||||
@@ -193,23 +189,3 @@ Check whether the node has a child node by `key`.
|
|||||||
`hasDescendant(key: String || Node) => Boolean`
|
`hasDescendant(key: String || Node) => Boolean`
|
||||||
|
|
||||||
Check whether the node has a descendant node by `key`.
|
Check whether the node has a descendant node by `key`.
|
||||||
|
|
||||||
|
|
||||||
## Transform Methods
|
|
||||||
|
|
||||||
Since nodes are immutable, all of the transform methods return a new copy of the node in question.
|
|
||||||
|
|
||||||
### `mapDescendants`
|
|
||||||
`mapDescendants(iterator: Function) => Node`
|
|
||||||
|
|
||||||
Map all of the descendant nodes of a node through an `iterator` function.
|
|
||||||
|
|
||||||
### `removeDescendant`
|
|
||||||
`removeDescendant(key: String || Node) => Node`
|
|
||||||
|
|
||||||
Remove a descendant node from the tree by `key`.
|
|
||||||
|
|
||||||
### `updateDescendant`
|
|
||||||
`updateDescendant(node: Node) => Node`
|
|
||||||
|
|
||||||
Update a descendant `node` to the new value.
|
|
||||||
|
@@ -29,26 +29,13 @@ 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)
|
||||||
- [Checking Methods](#checking-methods)
|
- [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)
|
||||||
- [`has{Edge}In`](#hasedgein)
|
- [`has{Edge}In`](#hasedgein)
|
||||||
- [`isAtEndOf`](#isatendof)
|
- [`isAtEndOf`](#isatendof)
|
||||||
- [`isAtStartOf`](#isatstartof)
|
- [`isAtStartOf`](#isatstartof)
|
||||||
- [Transforming Methods](#transforming-methods)
|
|
||||||
- [`blur`](blur)
|
|
||||||
- [`extendBackward`](#extendbackward)
|
|
||||||
- [`extendForward`](#extendforward)
|
|
||||||
- [`extendToEndOf`](#extendtoendof)
|
|
||||||
- [`extendToStartOf`](#extendtostartof)
|
|
||||||
- [`focus`](#focus)
|
|
||||||
- [`moveBackward`](#movebackward)
|
|
||||||
- [`moveForward`](#moveforward)
|
|
||||||
- [`moveToEndOf`](#movetoendof)
|
|
||||||
- [`moveToRangeOf`](#movetorangeof)
|
|
||||||
- [`moveToStartOf`](#movetostartof)
|
|
||||||
- [`moveTo{Edge}`](#movetoedge)
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
@@ -135,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`.
|
||||||
|
|
||||||
|
|
||||||
## Checking Methods
|
## Methods
|
||||||
|
|
||||||
### `has{Edge}AtStartOf`
|
### `has{Edge}AtStartOf`
|
||||||
`has{Edge}AtStartOf(node: Node) => Boolean`
|
`has{Edge}AtStartOf(node: Node) => Boolean`
|
||||||
@@ -166,68 +153,3 @@ Determine whether the selection is at the start of a `node`.
|
|||||||
`isAtEndOf(node: Node) => Boolean`
|
`isAtEndOf(node: Node) => Boolean`
|
||||||
|
|
||||||
Determine whether the selection is at the end of a `node`.
|
Determine whether the selection is at the end of a `node`.
|
||||||
|
|
||||||
|
|
||||||
## Transforming Methods
|
|
||||||
|
|
||||||
Since `Selection`s are immutable, all of the transforming methods return a new instance of the selection.
|
|
||||||
|
|
||||||
### `blur`
|
|
||||||
`blur() => Selection`
|
|
||||||
|
|
||||||
Change the selection's `isFocused` property to `false`.
|
|
||||||
|
|
||||||
### `extendBackward`
|
|
||||||
`extendBackward([n = 1: Number]) => Selection`
|
|
||||||
|
|
||||||
Decrease the selection's `focusOffset` by `n`, default to `1`.
|
|
||||||
|
|
||||||
### `extendForward`
|
|
||||||
`extendForward([n = 1: Number]) => Selection`
|
|
||||||
|
|
||||||
Increase the selection's `focusOffset` by `n`, default to `1`.
|
|
||||||
|
|
||||||
### `extendToEndOf`
|
|
||||||
`extendToEndOf(node: Node) => Selection`
|
|
||||||
|
|
||||||
Move the selection's `focusOffset` to the end of a `node`.
|
|
||||||
|
|
||||||
### `extendToStartOf`
|
|
||||||
`extendToStartOf(node: Node) => Selection`
|
|
||||||
|
|
||||||
Move the selection's `focusOffset` to the start of a `node`.
|
|
||||||
|
|
||||||
### `focus`
|
|
||||||
`focus() => Selection`
|
|
||||||
|
|
||||||
Change the selection's `isFocused` property to `true`.
|
|
||||||
|
|
||||||
### `moveTo{Edge}`
|
|
||||||
`moveTo{Edge}() => Selection`
|
|
||||||
|
|
||||||
Move both of the selection's points to an edge, collapsing it. Where `{Edge}` can be one of: `Anchor`, `Focus`, `Start` or `End`.
|
|
||||||
|
|
||||||
### `moveToEndOf`
|
|
||||||
`moveToEndOf(node: Node) => Selection`
|
|
||||||
|
|
||||||
Move both of the selection's points to the end of a `node`.
|
|
||||||
|
|
||||||
### `moveToRangeOf`
|
|
||||||
`moveToRangeOf(node: Node) => Selection`
|
|
||||||
|
|
||||||
Move the selection's anchor point to the start of a `node`, and its focus point to the end of the same `node`.
|
|
||||||
|
|
||||||
### `moveToStartOf`
|
|
||||||
`moveToStartOf(node: Node) => Selection`
|
|
||||||
|
|
||||||
Move both of the selection's points to the start of a `node`.
|
|
||||||
|
|
||||||
### `moveBackward`
|
|
||||||
`moveBackward([n = 1: Number]) => Selection`
|
|
||||||
|
|
||||||
Decrease the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`.
|
|
||||||
|
|
||||||
### `moveForward`
|
|
||||||
`moveForward([n = 1: Number]) => Selection`
|
|
||||||
|
|
||||||
Increase the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`.
|
|
||||||
|
Reference in New Issue
Block a user