This commit is contained in:
Philipp Kühn
2021-05-27 18:33:18 +02:00
2 changed files with 27 additions and 0 deletions

View File

@@ -1,3 +1,15 @@
# focus # focus
<ContentMissing /> <ContentMissing />
## Usage
```js
// Set the focus to the editor
editor.commands.focus()
// Set the cursor to the first position
editor.commands.focus('start')
// Set the cursor to the last position
editor.commands.focus('end')
```

View File

@@ -1,3 +1,18 @@
# setTextSelection # setTextSelection
<ContentMissing /> <ContentMissing />
## Parameters
`position: number | Range`
TODO
## Usage
```js
// Set the cursor to the specified position
editor.commands.setTextSelection(10)
// Set the text selection to the specified range
editor.commands.setTextSelection({ from: 5, to: 10 })
```