1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-16 11:22:15 +02:00

docs: Improve documentation around Editor.before and Editor.after

This commit is contained in:
Sunny Hirai 2021-07-08 13:12:11 -07:00
parent 7d14bef63b
commit 03e8230196

View File

@ -65,12 +65,16 @@ Options:
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}`
#### `Editor.before(editor: Editor, at: Location, options?) => Point | undefined`
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}`
#### `Editor.edges(editor: Editor, at: Location) => [Point, Point]`