From 6b94fb17c84f138cd834f677609b98b1ef2523f5 Mon Sep 17 00:00:00 2001 From: Sunny Hirai Date: Mon, 29 Mar 2021 00:54:15 -0700 Subject: [PATCH] Move Node Options up in documentation --- docs/api/editor.md | 2 ++ docs/api/transforms.md | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/api/editor.md b/docs/api/editor.md index 9f93e2b81..bd423a680 100644 --- a/docs/api/editor.md +++ b/docs/api/editor.md @@ -30,6 +30,8 @@ interface Editor { } ``` +Jump to: + - [Instantiation methods](#instantiation-methods) - [Static methods](#static-methods) - [Instance methods](#instance-methods) diff --git a/docs/api/transforms.md b/docs/api/transforms.md index 16d359b86..d497e034e 100644 --- a/docs/api/transforms.md +++ b/docs/api/transforms.md @@ -2,20 +2,17 @@ Transforms are helper functions operating on the document. They can be used in defining your own commands. -Jump to section: +Jump to: +- [Node Options](#node-options) - [Node Transforms](#node-transforms) - [Selection Transforms](#selection-transforms) - [Text Transforms](#text-transforms) - [Editor Transforms](#general-transforms) -## Node transforms +## Node Options -Transforms that operate on nodes. - -###### NodeOptions - -All transforms listed below support a parameter `options`. This includes options specific to the transform, and general `NodeOptions` to specify the place in the document that the transform is applied to. +All transforms support a parameter `options`. This includes options specific to the transform, and general `NodeOptions` to specify the place in the document that the transform is applied to. ```typescript interface NodeOptions { @@ -26,6 +23,10 @@ interface NodeOptions { } ``` +## Node transforms + +Transforms that operate on nodes. + ###### `Transforms.insertNodes(editor: Editor, nodes: Node | Node[], options?)` Insert `nodes` at the specified location in the document. If no location is specified, insert at the current selection. If there is no selection, insert at the end of the document.