1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-21 06:31:28 +02:00

Documenting node's 'getFirstText' & 'getLastText' (#779)

Noticed a couple of useful functions I found useful that weren't documented. Also, fixed a couple of broken links.
This commit is contained in:
Anuj
2017-05-04 05:57:52 -07:00
committed by Ian Storm Taylor
parent 5258b38508
commit fb6f3d5b61

View File

@@ -12,7 +12,7 @@
- [Methods](#methods) - [Methods](#methods)
- [`filterDescendants`](#filterdescendants) - [`filterDescendants`](#filterdescendants)
- [`findDescendant`](#finddescendant) - [`findDescendant`](#finddescendant)
- [`getBlocksAtRange`](#getblockatrange) - [`getBlocksAtRange`](#getblocksatrange)
- [`getBlocks`](#getblocks) - [`getBlocks`](#getblocks)
- [`getCharactersAtRange`](#getcharactersatrange) - [`getCharactersAtRange`](#getcharactersatrange)
- [`getChild`](#getchild) - [`getChild`](#getchild)
@@ -21,13 +21,15 @@
- [`getClosest`](#getclosest) - [`getClosest`](#getclosest)
- [`getDepth`](#getdepth) - [`getDepth`](#getdepth)
- [`getDescendant`](#getdescendant) - [`getDescendant`](#getdescendant)
- [`getFirstText`](#getfirsttext)
- [`getFragmentAtRange`](#getfragmentatrange) - [`getFragmentAtRange`](#getfragmentatrange)
- [`getInlinesAtRange`](#getinlinesatrange) - [`getInlinesAtRange`](#getinlinesatrange)
- [`getLastText`](#getlasttext)
- [`getMarksAtRange`](#getmarksatrange) - [`getMarksAtRange`](#getmarksatrange)
- [`getNextBlock`](#getnextblock) - [`getNextBlock`](#getnextblock)
- [`getNextSibling`](#getnextsibling) - [`getNextSibling`](#getnextsibling)
- [`getNextText`](#getnexttext) - [`getNextText`](#getnexttext)
- [`getParent`](#parent) - [`getParent`](#getparent)
- [`getPreviousBlock`](#getpreviousblock) - [`getPreviousBlock`](#getpreviousblock)
- [`getPreviousSibling`](#getprevioussibling) - [`getPreviousSibling`](#getprevioussibling)
- [`getPreviousText`](#getprevioustext) - [`getPreviousText`](#getprevioustext)
@@ -129,6 +131,11 @@ Get the depth of a descendant node by `key`.
Get a descendant node by `key`. Get a descendant node by `key`.
### `getFirstText`
`getFirstText() => Node || Void`
Get the first child text node inside a node.
### `getFragmentAtRange` ### `getFragmentAtRange`
`getFragmentAtRange(range: Selection) => Document` `getFragmentAtRange(range: Selection) => Document`
@@ -139,6 +146,11 @@ Get a document fragment of the nodes in a `range`.
Get all of the top-most [`Inline`](./inline.md) nodes in a `range`. Get all of the top-most [`Inline`](./inline.md) nodes in a `range`.
### `getLastText`
`getLastText() => Node || Void`
Get the last child text node inside a node.
### `getMarksAtRange` ### `getMarksAtRange`
`getMarksAtRange(range: Selection) => Set` `getMarksAtRange(range: Selection) => Set`