From 811bf693eb5b927ec5f8120b56b2ae92f5ba2734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Tue, 27 Apr 2021 11:41:24 +0200 Subject: [PATCH] feat: add setNodeSelection and setTextSelection commands --- docs/src/docPages/api/commands.md | 2 ++ .../api/commands/set-node-selection.md | 3 +++ .../api/commands/set-text-selection.md | 3 +++ docs/src/links.yaml | 4 ++++ .../core/src/commands/setNodeSelection.ts | 23 +++++++++++++++++++ .../core/src/commands/setTextSelection.ts | 23 +++++++++++++++++++ packages/core/src/extensions/commands.ts | 6 +++++ 7 files changed, 64 insertions(+) create mode 100644 docs/src/docPages/api/commands/set-node-selection.md create mode 100644 docs/src/docPages/api/commands/set-text-selection.md create mode 100644 packages/core/src/commands/setNodeSelection.ts create mode 100644 packages/core/src/commands/setTextSelection.ts diff --git a/docs/src/docPages/api/commands.md b/docs/src/docPages/api/commands.md index a9355d0e0..b0c61446b 100644 --- a/docs/src/docPages/api/commands.md +++ b/docs/src/docPages/api/commands.md @@ -209,6 +209,8 @@ Have a look at all of the core commands listed below. They should give you a goo | .selectNodeBackward() | Select a node backward. | [More](/api/commands/select-node-backward) | | .selectNodeForward() | Select a node forward. | [More](/api/commands/select-node-forward) | | .selectParentNode() | Select the parent node. | [More](/api/commands/select-parent-node) | +| .setNodeSelection() | Creates a NodeSelection. | [More](/api/commands/set-node-selection) | +| .setTextSelection() | Creates a TextSelection. | [More](/api/commands/set-text-selection) |