remove gridsome

This commit is contained in:
Philipp Kühn
2021-09-16 14:41:25 +02:00
parent e012a29240
commit 2f15a11572
311 changed files with 157 additions and 10308 deletions

View File

@@ -0,0 +1,26 @@
# focus
This command sets the focus back to the editor.
When a user clicks on a button outside the editor, the browser sets the focus to that button. In most scenarios you want to focus the editor then again. Thats why youll see that in basically every demo here.
See also: [setTextSelection](/api/commands/set-text-selection), [blur](/api/commands/blur)
## Parameters
`position: 'start' | 'end' | number | boolean | null (false)`
By default, its restoring the cursor position (and text selection). Pass a position to move the cursor too.
## 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')
// Set the cursor to position 10
editor.commands.focus(10)
```