Skip to content

Commit 1016ba1

Browse files
devvaannshabose
authored andcommitted
fix: incorrect info about positioning a menu item
1 parent cf62a6d commit 1016ba1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/08-How-To/Menus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ To position the menu item before or after any item, use
178178

179179
```jsx
180180
// second parameter is for keyboard shortcut. Empty string means no shortcut.
181-
menu.addMenuItem(MY_COMMAND_ID, "", "before", "file.saveAs");
181+
menu.addMenuItem(MY_COMMAND_ID, "", Menus.BEFORE, Commands.FILE_SAVE_AS);
182182
```
183183

184-
- Third parameter must specify “before” or “after” the item should be set.
184+
- Third parameter must specify `BEFORE` or `AFTER` the item should be set.
185185
- Fourth parameter must specify the “relativeID” of the menu item to set the position.
186186

187187
![Menu Item before/after](./images/menu-item-before-after.png)

0 commit comments

Comments
 (0)