docs: update content

This commit is contained in:
Hans Pagel
2020-12-04 13:41:05 +01:00
parent 037658e701
commit 70c2590c72
2 changed files with 11 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ editor.chain().toggleBold().focus().run()
In other words: This will be the typical **Bold** button for your text editor.
Which commands are available depends on what extensions youve registered with editor. Most of the extensions come with a `set…()`, `unset…()` and `toggle…()` command. Read the extension documentation to see whats actually available or just surf through your code editors autocomplete.
Which commands are available depends on what extensions youve registered with the editor. Most of the extensions come with a `set…()`, `unset…()` and `toggle…()` command. Read the extension documentation to see whats actually available or just surf through your code editors autocomplete.
## Keep the focus
Youve seen the `focus()` command in the above example already. When you click on the button, the browser focuses that DOM element and the editor loses focus. Its likely you want to add `focus()` to all your toolbar buttons, so the writing flow of your users isnt interrupted.