mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-12 02:03:59 +02:00
docs: Improve documentation around Editor.before and Editor.after
This commit is contained in:
@@ -65,12 +65,16 @@ Options:
|
|||||||
|
|
||||||
Get the point after a location.
|
Get the point after a location.
|
||||||
|
|
||||||
|
If there is no point after the location (e.g. we are at the bottom of the document) returns `undefined`.
|
||||||
|
|
||||||
Options: `{distance?: number, unit?: 'offset' | 'character' | 'word' | 'line' | 'block', voids?: boolean}`
|
Options: `{distance?: number, unit?: 'offset' | 'character' | 'word' | 'line' | 'block', voids?: boolean}`
|
||||||
|
|
||||||
#### `Editor.before(editor: Editor, at: Location, options?) => Point | undefined`
|
#### `Editor.before(editor: Editor, at: Location, options?) => Point | undefined`
|
||||||
|
|
||||||
Get the point before a location.
|
Get the point before a location.
|
||||||
|
|
||||||
|
If there is no point before the location (e.g. we are at the top of the document) returns `undefined`.
|
||||||
|
|
||||||
Options: `{distance?: number, unit?: 'offset' | 'character' | 'word' | 'line' | 'block', voids?: boolean}`
|
Options: `{distance?: number, unit?: 'offset' | 'character' | 'word' | 'line' | 'block', voids?: boolean}`
|
||||||
|
|
||||||
#### `Editor.edges(editor: Editor, at: Location) => [Point, Point]`
|
#### `Editor.edges(editor: Editor, at: Location) => [Point, Point]`
|
||||||
|
Reference in New Issue
Block a user