mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
docs: add Span to documentation
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
- [PointRef](api/locations/point-ref.md)
|
- [PointRef](api/locations/point-ref.md)
|
||||||
- [Range](api/locations/range.md)
|
- [Range](api/locations/range.md)
|
||||||
- [RangeRef](api/locations/range-ref.md)
|
- [RangeRef](api/locations/range-ref.md)
|
||||||
|
- [Span](api/locations/span.md)
|
||||||
- [Operation](api/operation.md)
|
- [Operation](api/operation.md)
|
||||||
|
|
||||||
## Libraries
|
## Libraries
|
||||||
|
@@ -11,3 +11,4 @@ type Location = Path | Point | Range
|
|||||||
- [Point](./point.md)
|
- [Point](./point.md)
|
||||||
- [PointEntry](./pointe-entry.md)
|
- [PointEntry](./pointe-entry.md)
|
||||||
- [Range](./range.md)
|
- [Range](./range.md)
|
||||||
|
- [Span](./span.md)
|
||||||
|
18
docs/api/locations/span.md
Normal file
18
docs/api/locations/span.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Span
|
||||||
|
|
||||||
|
A `Span` is a low-level way to refer to a range using `Element` as the end points instead of a `Point` which requires the use of leaf text nodes.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
type Span = [Path, Path]
|
||||||
|
```
|
||||||
|
|
||||||
|
- [Static methods](range.md#static-methods)
|
||||||
|
- [Check methods](range.md#check-methods)
|
||||||
|
|
||||||
|
## Static Methods
|
||||||
|
|
||||||
|
### Check Methods
|
||||||
|
|
||||||
|
#### `Span.isSpan(value: any) => value is Span`
|
||||||
|
|
||||||
|
Check if a `value` implements the `Span` interface.
|
Reference in New Issue
Block a user