Skip to content

Commit 0ef752e

Browse files
committed
chore: change order in docs
1 parent aef4d84 commit 0ef752e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: src/content/editor/api/editor.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Create a command chain to call multiple commands at once.
254254

255255
```js
256256
// Execute two commands at once
257-
editor.chain().toggleBold().focus().run()
257+
editor.chain().focus().toggleBold().run()
258258
```
259259

260260
### destroy()

Diff for: src/content/editor/getting-started/install/alpine.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ document.addEventListener('alpine:init', () => {
8181
editor.chain().toggleHeading(opts).focus().run()
8282
},
8383
toggleBold() {
84-
editor.chain().toggleBold().focus().run()
84+
editor.chain().focus().toggleBold().run()
8585
},
8686
toggleItalic() {
8787
editor.chain().toggleItalic().focus().run()

Diff for: src/content/guides/upgrade-tiptap-v1.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Read the dedicated [guide on creating menus](/editor/getting-started/style-edito
172172
Most commands can be combined to one call now. That’s shorter than separate function calls in most cases. Here is an example to make the selected text bold:
173173

174174
```js
175-
editor.chain().toggleBold().focus().run()
175+
editor.chain().focus().toggleBold().run()
176176
```
177177

178178
The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Read more about [the new Tiptap commands](/editor/api/commands) in our API documentation.

0 commit comments

Comments
 (0)