docs: update content
This commit is contained in:
@@ -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')
|
||||||
|
```
|
||||||
|
|||||||
@@ -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 })
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user