diff --git a/docs/api/nodes/editor.md b/docs/api/nodes/editor.md index da97db8d2..631e6bd30 100644 --- a/docs/api/nodes/editor.md +++ b/docs/api/nodes/editor.md @@ -49,7 +49,7 @@ Creates a new, empty `Editor` object. ### Retrieval methods -#### `Editor.above(editor: Editor, options?): NodeEntry | undefined` +#### `Editor.above(editor: Editor, options?): NodeEntry | undefined` Get the ancestor above a location in the document. @@ -93,12 +93,16 @@ Get the leaf text node at a location. Options: `{depth?: number, edge?: 'start' | 'end'}` -#### `Editor.levels(editor: Editor, options?): Generator` +#### `Editor.levels(editor: Editor, options?): Generator, void, undefined>` Iterate through all of the levels at a location. Options: `{at?: Location, match?: NodeMatch, reverse?: boolean, voids?: boolean}` +#### `Editor.marks(editor: Editor): Omit | null` + +Get the marks that would be added to text at the current selection. + #### `Editor.next(editor: Editor, options?): NodeEntry | undefined` Get the matching node in the branch of the document after a location. @@ -107,6 +111,8 @@ Options: `{at?: Location, match?: NodeMatch, mode?: 'all' | 'highest' | 'lowest' #### `Editor.node(editor: Editor, at: Location, options?): NodeEntry` +#### `Editor.nodes(editor: Editor, options?): Generator, void, undefined>` + Get the node at a location. Options: `depth?: number, edge?: 'start' | 'end'` @@ -171,7 +177,7 @@ Note: By default void nodes are treated as a single point and iteration will not Options: `{at?: Location, unit?: 'offset' | 'character' | 'word' | 'line' | 'block', reverse?: boolean, voids?: boolean}` -#### `Editor.previous(editor: Editor, options?): NodeEntry | undefined` +#### `Editor.previous(editor: Editor, options?): NodeEntry | undefined` Get the matching node in the branch of the document before a location.