From 7d14bef63bd5067261221590909f38b37caf188d Mon Sep 17 00:00:00 2001 From: Sunny Hirai Date: Thu, 8 Jul 2021 13:06:41 -0700 Subject: [PATCH] docs: Improve documentation for Editor.previous and Editor.next --- docs/api/nodes/editor.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api/nodes/editor.md b/docs/api/nodes/editor.md index 05f47721c..e9c63d672 100644 --- a/docs/api/nodes/editor.md +++ b/docs/api/nodes/editor.md @@ -113,6 +113,8 @@ Get the marks that would be added to text at the current selection. Get the matching node in the branch of the document after a location. +Note: If you are looking for the next Point, and not the next Node, you are probably looking for the method `Editor.after` + Options: `{at?: Location, match?: NodeMatch, mode?: 'all' | 'highest' | 'lowest', voids?: boolean}` #### `Editor.node(editor: Editor, at: Location, options?) => NodeEntry` @@ -196,6 +198,8 @@ Options: Get the matching node in the branch of the document before a location. +Note: If you are looking for the previous Point, and not the previous Node, you are probably looking for the method `Editor.before` + Options: `{at?: Location, match?: NodeMatch, mode?: 'all' | 'highest' | 'lowest', voids?: boolean}` #### `Editor.range(editor: Editor, at: Location, to?: Location) => Range`