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

Documenting node's getFurther* functions (#845)

I remembered coming across these functions and then didn't find them in the docs. So, here they are now!
This commit is contained in:
Anuj 2017-05-30 12:07:24 -07:00 committed by Ian Storm Taylor
parent 4013d0b18a
commit c26f2dc71b

View File

@ -23,6 +23,11 @@
- [`getDescendant`](#getdescendant)
- [`getFirstText`](#getfirsttext)
- [`getFragmentAtRange`](#getfragmentatrange)
- [`getFurthestAncestor`](#getfurthestancestor)
- [`getFurthestBlock`](#getfurthestblock)
- [`getFurthestInline`](#getfurthestinline)
- [`getFurthestOnlyChildAncestor`](#getfurthestonlychildancestor)
- [`getFurthestBlock`](#getfurthestblock)
- [`getInlinesAtRange`](#getinlinesatrange)
- [`getLastText`](#getlasttext)
- [`getMarksAtRange`](#getmarksatrange)
@ -141,6 +146,31 @@ Get the first child text node inside a node.
Get a document fragment of the nodes in a `range`.
### `getFurthest`
`getFurthest(key: String, iterator: Function) => Node || Null`
Get the furthest parent of a node by `key` that matches an `iterator`.
### `getFurthestAncestor`
`getFurthestAncestor(key: String) => Node || Null`
Get the furthest ancestor of a node by `key`.
### `getFurthestBlock`
`getFurthestBlock(key: String) => Node || Null`
Get the furthest block parent of a node by `key`.
### `getFurthestInline`
`getFurthestInline(key: String) => Node || Null`
Get the furthest inline parent of a node by `key`.
### `getFurthestOnlyChildAncestor`
`getFurthestOnlyChildAncestor(key: String) => Node || Null`
Get the furthest ancestor of a node by `key` that has only one child.
### `getInlinesAtRange`
`getInlinesAtRange(range: Selection) => List`