docs: update content

This commit is contained in:
Hans Pagel
2021-05-27 10:53:34 +02:00
parent 6990012a7b
commit fd6f3fed4c
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 })
```